Hi Friends.......
Tell me that How do we know if an explicit object casting is needed?
Thanks.......
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Jan 7, 2012, 12:39 AM
If you assign a super class object to a variable of a sub class data type, you need to do explicit casting.
Whenever you assign super class object to sub class object , explicit object casting is needed.
If you assign sub class object to super class object, no object casting is needed.
We know that Object class is super class for all class.
Object obj=new Object( );
Customer e=(Customer) obj;
Thanks
Vikas MishraPosted Jan 9, 2012, 11:23 AM
VulpesPosted Jan 7, 2012, 8:53 AM