In reply to Shiv_coder:
class abc;
int a = 100;
function disp();
$display(a);
endfunction
endclass
class ab extends abc;
function disp1();
this.disp();
endfunction
endclass
module aa;
ab a1 = new();
initial begin
a1.disp();
end
endmodule
Is this what you are looking for?