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 JDBC Driver interface?How can you retrieve data from the ResultSet
What is the advantage of functional interface in java 8?
Can you explain the usages of class.forname()?
What are the wrapped, classes?
Which is dependent variable?
what is singleton in java?
What is unmodifiable list in java?
Explain the hierarchy of java exception classes?
What kind of variables can a class consist?
What are the steps involved to create a bean?
What does || mean in code?
What is the difference between form & report?
What is string pool in java?
How many bytes is a unicode character?
What is the new line character?