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 data type is a string?
What is the java virtual machine?
Can a class have a static inner class?
Which class is the superclass for all the classes?
How to display all the prime numbers between 1 and n (n is the number, get the input from user)
Why java is object oriented?
What is int lol?
When should I use stringbuffer?
Why do we need wrapper class?
Is static a keyword in java?
What are void methods?
What are the different types of constructor?
What is singleton class in ruby?
What are synchronized blocks in java?
What is the difference between serializable and externalizable interfaces?