please write java program of instanceOf keyword implementation

Answers were Sorted based on User's Feedback



please write java program of instanceOf keyword implementation..

Answer / dhanasekar

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 ?    7 Yes 1 No

please write java program of instanceOf keyword implementation..

Answer / karunakar

false

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Explain java thread life cycle.

0 Answers  


What are the main differences between the java platform and other platforms?

0 Answers  


What are the limitations of procedural programming approach?

0 Answers   Amdocs,


How will you call an Applet using Java Script Function?

0 Answers  


How do you use nextline in java?

0 Answers  






What is stringjoiner ?

0 Answers  


What are the basic control structures?

0 Answers  


What is object cloning in Java?

0 Answers   SwanSoft Technologies,


What are actual parameters?

0 Answers  


Explain class A{} class B{} class C{} all the three classes are saved in a single file name, what the name should i provide to the file ,in what file name should i run the program? Ple Explain

9 Answers   DNS, Infosys, TCS,


Difference between ‘is-a’ and ‘has-a’ relationship in java?

0 Answers  


Are arrays static in java?

0 Answers  


Categories