When can an object reference be cast to an interface reference in java programming?



When can an object reference be cast to an interface reference in java programming?..

Answer / Abhay Verma

An object reference can be cast to an interface reference if the object is an instance of the class that implements the interface.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the % operator?

2 Answers  


what is difference between length and length()?

8 Answers  


what is difference between type 4 driver and type 1 driver?

2 Answers   CMC, CTS, IBM, JK Technosoft, Napier Healthcare,


What is static binding and where it occurs?

4 Answers  


adapter class ?

2 Answers  


How do you use find and replace?

1 Answers  


Can a static member function access member variable of an object?

1 Answers   Virtusa,


What is tcp and udp?

1 Answers  


What are MalformedURLException and UnknownHost Exceptions and whey they will be thrown?

2 Answers  


when a servlet sends request for first time it uses the follwing methods a)init b)doget() c)dopost() d)service

4 Answers   Accenture,


What are three ways in which a thread can enter the waiting state in java programming?

1 Answers  


Will the compiler creates a default constructor if I have a parameterized constructor in the class?

1 Answers  


Categories