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 are data types in programming?
What is void class in java?
How do you bind variables?
What are predicates in java 8?
Is java hashset ordered?
What is a singleton factory?
Can you use abstract and final both with a method?
What is a ?
Can we create a class inside a class in java?
How to print an arraylist in java?
Does set allows null in java?
What is static class
What is a nested class?
Who is the owner of java?
What is private public protected in java?