Under what circumstances an object reference be cast to an
interface reference?

Answers were Sorted based on User's Feedback



Under what circumstances an object reference be cast to an interface reference?..

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

Under what circumstances an object reference be cast to an interface reference?..

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

Under what circumstances an object reference be cast to an interface reference?..

Answer / debapriya maity

Exactly whenever ur entity passed the IS-A Test ,

A is B :)

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is tcp and udp?

0 Answers  


To what value is a variable of the Boolean type automatically initialized?

3 Answers  


What does @param args mean in java?

0 Answers  


Is java type safe?

0 Answers  


What are the 4 versions of java?

0 Answers  






What do you mean by data type?

0 Answers  


How many ways can an argument be passed to a subroutine and explain them?

0 Answers  


What is an interoperable application in java ?

0 Answers   HCL,


What is data string?

0 Answers  


What is initial size of arraylist in java?

0 Answers  


What is an inner class in java?

0 Answers  


How do you use compareto method?

0 Answers  


Categories