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
What does substring mean?
What are internal and external variables?
Can we make a constructor final?
Why array is used in java?
how to create constants in java?
What is comparator in java?
What is the purpose of methodology?
How to avoid memory leak in java?
What is the difference between the font and fontmetrics classes in java programming?
If you do not want your class to be inherited by any other class. What would you do?
Explain list interface?
Why parameters should be passed by reference?
What are the uses of synchronized keyword?
What is early binding and late binding in java?
Which is the best sorting technique in java?