Randomizing a dynamic array size

Hi dave,
can you plaese explain why we can’t use program block here.

module test1; // don't use program blocks //why ?
   Objects objs; // declare static variables outside of initial blocks
   
   initial begin
      objs  = new;
      void'(objs.randomize()); // normally should check the result 
      $display("Allocated an array of size=%0d", objs.lst.size());
   end
endmodule : test1