Answer Posted / malligontla
A super class reference can be converted into a subclass
reference but this subclass reference is not useful to call
the methods of any of the classes. This convention is known
as Downcasting.
We can convert the subclass reference to a superclass
reference without using the cast operation, because compiler
will internally take care of the casting. This is known as
Upcasting.
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How can you make a class serializable in java?
What are the classes of java?
What is a file pointer?
Can we have more than one package statement in source file ?
What is unicode full form?
What access modifiers can be used for class ?
Differentiate storage classes on the basis of their scope?
What is the difference between method overriding and overloading?
What are the rules for variable declaration?
What is return in java?
How do you check if two strings are equal in java?
What is the difference between double and float variables in java?
What is default constructors?
what is a thread pool in java and why is it used?
What about static nested classes in java?