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
What is static keyword in java?
What is the default access specifier for variables and methods of a class?
What is a treeset class?
What is the purpose of using java.lang.class class?
What is unicode full form?
What is the final class?
what is the difference between process and thread? : Java thread
What are the advantages of encapsulation in java?
what is use of functional interface in java 8?
What is meant by singleton class?
How do you generate random numbers in java?
What is anti pattern in programming?
Why are there no global variables in java?
Is map ordered in java?
Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me