ALLInterview.com :: Home Page            
 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                      
Google
   
 
Categories >> Software >> Java Related >> Java J2EE >> Core Java
 
 


 

 
 Core Java interview questions  Core Java Interview Questions (1722)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (147)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
Question
please write java program of instanceOf keyword implementation
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
public class MainClass {
public static void main(String[] a) {

String s = null;
if (s instanceof java.lang.String) {
System.out.println("true");
} else {
System.out.println("false");
}
}

}
 
Is This Answer Correct ?    5 Yes 1 No
Dhanasekar
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is difference between abstract class & final class   7
What is the method used to get the absolute value of a number?   2
suppose in a class there is a code like this: { Set hs=new Hashset(); hs.add(new Emp("kathy",1000)); hs.add(new Emp("kathy",2000)); } how can u avoid the above code in your class as set won't allow duplicate objects?   3
can we create object for static class in java Marlabs 12
what is Hashmap & Hashtable wirh example? Saksoft 5
What are the steps to do connection pooling in weblogic? TCS 1
diff b/w sleep(1000) and wait(1000)? Huawei 4
what are the methods of an object class?   3
Can Anybody tell the diff b/w jdk1.6 and latest version.   2
Default layout of panel and frame?   3
What is the difference between C++ & Java? Syntel 78
What is an object?s lock? Give name of object?s that have locks?   2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com