Write program for single objects returns two instances?

Showing Answers 1 - 1 of 1 Answers

SrinivasRao

  • Jan 17th, 2006
 

I think this is the one of the way to return two refference fro one Object

ClassA extends from ClassB

then

in ClassB

we can write like this

ClassB b=new ClassB();

this is one

and

ClassA a= new ClassB();

this is two

of course at complie time it seems to be same but runtime the internal objects are same so

from one object we can creat 2 instances

send me u r opinion s

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions