26. Since the readObject method returns a generic object, what must we do with the returned object?
1
Expert's answer
2012-12-11T09:30:04-0500
You need to do an Object typecasting Syntax: (classname) generic object The following example casts an instance of the classVicePresident to an instance of the classEmployee; VicePresident is a subclass of Employee with more information, which here defines that the VicePresident has executive washroom privileges: Employee emp = new Employee(); VicePresident veep = new VicePresident(); emp = veep; // no cast needed for upward use veep = (VicePresident)emp; // must cast explicitly
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment