Under what circumstances an object reference be cast to an
interface reference?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / janet
When the object implements the referenced interface, an
object reference be cast to an interface reference.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / debapriya maity
Exactly whenever ur entity passed the IS-A Test ,
A is B :)
| Is This Answer Correct ? | 1 Yes | 0 No |
What are the advantages and disadvantages of reference counting in garbage collection?
What is use of map in java?
What is the difference between interpreter and compiling ?
what is language and it responsibilities
What is the purpose of void class?
Is string a data type in java?
How finally used under exception handling?
Explain the significance of listiterator.
what is singleton class in java?
why there are multiple catches for a try block.don't tell me that there can be multiple exception of a code segment that's why.tell me the real fact behind this.
How do you control extraneous variables?
What is bigger kb or mb?