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 is mutability?which one is mutable String or StringBuffer?and why?give examples of each which shows the mutability of each String or StringBuffer
how to handle exceptions in ejb?
What is the default initialized value of a boolean type variable?
How to store image in arraylist in java?
What do you mean by of string::valueof expression in java 8?
What are the benefits of operations?
what is the difference between object and class
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
Can we sort hashset in java?
What are internal and external variables?
Explain constructors and types of constructors in java.
What is ellipsis in java?