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 an outer class cannot be declared as private?
What are the wrapped, classes?
How do you load an HTML page from an Applet ?
We can write any Java Logics in our JSP. Then why we are using servlets(Controller Layer) to interact with the DAO ?
What will happen if we declare don’t declare the main as static?
Is java owned by oracle?
What is methods in java?
Difference between abtsract & final
How to print an arraylist in java?
How to avoid the runtime exception ?
What is substring of a string?
What is a ?