please write java program of instanceOf keyword implementation
Answer Posted / 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 |
Post New Answer View All Answers
what do you understand by the term string with respect to java?
Define inheritance?
What is computer compiler?
What does n mean in java?
What are synchronized blocks in java?
How are observer and observable used in java programming?
What is finally in Java?
What access modifiers can be used for class ?
What's the purpose of static methods and static variables?
How do you invoke a method?
What is the maximum length of a url?
What are the important features of Java 8 release?
What is the output of the below java program?
Difference between arraylist and vector.
What is the current version of java?