Answer Posted / arjun kumar
When we cast a reference along the class hierarchy in a
direction from the sub classes towards the root, it is an
upcast.
When we cast a reference along the class hierarchy in a
direction from the root class towards the children or
subclasses, it is downcast.
| Is This Answer Correct ? | 19 Yes | 3 No |
Post New Answer View All Answers
Why does abstract class have constructor?
5 Coding best practices you learned in java?
How do you make a thread in java?
What are the methods to rectify ambiguities in the interfaces in JAVA?
Explain the difference between collection api and stream api in java8?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
Can we override the static methods?
Is overriding possible in java?
What is the difference between jfc & wfc?
How many bytes is a char in java?
How is hashcode calculated in java?
What is the default value of local and global variables?
Can you pass functions in java?
Does it matter in what order catch statements for filenotfoundexception and ioexception are written?
How do you find the maximum number from an array without comparing and sorting?