In reply to dharamvir:
randomize() is a built-in virtual method of a class, but it is being called inside the constructor.
The latest IEEE 1800-2017 SystemVerilog LRM recently clarified the behavior of a virtual methods calls from within the chain of base class constructors. The virtual method called will be the same as if the call was not from the constructor, however, variable initializations other than the default initial value will not have occured.
class A;
rand bit[7:0] j;
function new();
assert(randomize());
endfunction
endclass
class C;
endclass
class B extends A;
rand bit [7:0] w,x=2; // initialization of x happens after calling randomize()
constraint c { j == x;}
endclass
module top();
B b;
initial begin
b=new();
$display(" b %p ",b);
end
endmodule