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 |
Why do we need singleton class?
what is a transient variable?
Can inner class have constructor?
Can we declare a class as static?
What is return null in java?
What are virtual methods?
What is the benefit of inner / nested classes ?
Define linked list and its features with signature?
what is servlet filter?
can we take more than one null values for Unique constraints.
how to deploy apache tomcat server to weblogic server in java
Which is better 64 bit or 32 bit?