• +91 9723535972
  • info@interviewmaterial.com

Java Interview Questions and Answers

Question - How do you know if an explicit object casting is needed?

Answer - If you assign a superclass object to a variable of a subclass's data type, you need to do explicit casting. For example: Object a; Customer b; b = (Customer) a; When you assign a subclass to a variable having a supeclass type, the casting is performed automatically.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners