posted 13 years ago
Given a sample program kindly have a look
Result of this program when compiled and run is " B B "
Now my question is what the use of writing in the code : A y = new B(); rather than B b = new B(); also tell benefits and difference.
Thanks in advance