Answer Posted / vikram aditya
When reference variable of super class refers to the object of sub class that mechanism is known as Up-casting.
Ex:
A a=new B();
When reference variable of sub class refers to the object of super class that mechanism is known as Down-casting.
Ex:
B b=(B) a;
//Where A is super class and B is subclass
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Explain about java sdk?
Why can't we make a class private in java?
What is the base class of all classes?
what is use of functional interface in java 8?
What is linkedlist in java?
Explain the JDB in depth & command line.
How to disable caching on back button of the browser?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
How to create a thread in java?
Difference difference paint() and paintcomponent()?
What Is Query Throttling in java?
Can we have multiple public classes in a java source file?
How do I get 64 bit java?
Why declare Main() method as a static in java ?
What is procedure overloading?