ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
Under what circumstances an object reference be cast to an 
interface reference?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Under what circumstances an object reference be cast to an interface reference?
Answer
# 1
When the object implements the referenced interface, an
object reference be cast to an interface reference.
 
Is This Answer Correct ?    0 Yes 0 No
Janet
 
  Re: Under what circumstances an object reference be cast to an interface reference?
Answer
# 2
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 ?    4 Yes 0 No
Muthusenthil
 
 
 
  Re: Under what circumstances an object reference be cast to an interface reference?
Answer
# 3
Exactly whenever ur entity passed the IS-A Test ,

A is B :)
 
Is This Answer Correct ?    0 Yes 0 No
Debapriya Maity
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What are the Object and Class that classes used for?  3
explain the classification of exception and hoew to handle the exceptions  2
Which class is the immediate superclass of the Container class?  1
Why to give the file name same as the public class name in java?  3
If all the methods in abstract class are declared as abstract then what is difference between abstract class and in interface? Synechron6
what is the purpose of class "Object" which is base class for all classes?  3
What is a super class and how super class be called?  3
What error occurs if a try-catch-finally statement sequence does not have a catch clause?  2
what is difference between requestprocessor and request dispatcher? Tech-Mahindra1
In which way does a Primitive data type is passed ? Sun-Microsystems2
what is struts-config-xml?and its use?  3
Define interface?  2
What are Advatages of Overloading and Overridding. TCS3
i need example for java abstraction. where we use abstraction and why we need abstraction. Oracle1
what is the difference between Java Command Line and C command Line?  1
what is overloading in java? DNS4
How do u provide security in java  1
What is parameter tag and what is its use?  1
Iterator in the HashMap is fail-safe means what? IBM9
Explain different ways of passing arguments to sub-routine?  1
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com