Hi Friends.......
Tell me that How do we know if an explicit object casting is needed?
Thanks.......
Explicit Object
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Jan 6, 2012, 7:39 PM EST
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
VulpesRank #55 · 29.2K reputationPosted Jan 7, 2012, 3:53 AM EST
Vikas MishraRank #559 · 4.3K reputationPosted Jan 9, 2012, 6:23 AM EST