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 large is a boolean?
Is java call by reference?
What is object-oriented programming?
What are the types of methodology?
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?
What is methods in java?
What is the difference between a choice and a list?
What is Classloader in Java?
How do you sort a string in alphabetical order in java?
What is boolean query?
What is hashmap and map?
How do you define a variable?
What is the major difference between linkedlist and arraylist?
Can we pass null as argument in java?
What is singleton pattern?