Under what circumstances an object reference be cast to an
interface reference?
Answer Posted / muthusenthil
when a class implements an interface then an object
referance of that class can be casted to interface referance
class A implements B{
public static void main(String args[]){
B b=new A();
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is sortedmap interface?
Can java object be locked down for exclusive use by a given thread?
what do you mean by classloader in java?
Can we declare a static variable inside a method?
Can we create our own daemon thread?
What is map java?
What is private public protected in java?
v-model life cycle
What is the loop in java?
What are the major advantages of internal iteration over external iteration?
Will the jvm load the package twice at runtime?
What are the 4 types of characters?
What is lazy programming?
Is math an abstract class in java?
What is a top level class in java?