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 collection class in java?
what is the constructor and how many types of constructors are used in java?
Explain the selection sort algorithm?
What does it mean to flush a file?
What is high level language in computer?
How to make a write-only class in java?
Explain about field hiding in java?
Explain the usage of this with constructors?
What is the purpose of extern variable?
What is the access scope of protected access specifier?
What is garbage collection? Can it be forced to run?
Give the difference between the println method and sqrt method?
What do you mean by garbage collection used in java?
Which language is java?
What is the advantage of OOP in java?