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 is functional interface in javatpoint?
Can I use % with real numbers?
Is java a super set of javascript?
How a variable is stored in memory?
Why is multiple inheritance not supported in java?
Can you access the private method from outside the class?
How to disable caching on back button of the browser?
Explain the reason behind ending a program with a system.exit(0)?
what is difference between equals and ==?
What is identifier with example?
What are scriptlets?
What is the difference between access specifiers and access modifiers in java?
Write a program to check for a prime number in java?
What do you understand by overloading and overriding in java?
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?