I'm trying to create an array of handles for a class, by randomize function I'll get the "no of transcations", this determines the no of handles to be created.class_name obj_name[transactions]; is this right?

In reply to dave_59:

virtual task body();
	     a.randomize();
	    txns = a.transactions; 
	   classA obj[txns];
 for(int i=0; i<txns; i=i+1)begin
	    `ovm_create(obj[ i])
             a.randomize();
	     int x = a.core;
	    `ovm_send(obj[i])
	      wait(obj.rsp != null );
          end   
	endtask : body