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
Is 0 true or false?
How do singleton patterns work?
List types of storage classes in java?
What is bufferedwriter?
What are methods?
What are format specifiers in java?
What are the differences between c++ and java?
How do you declare a string variable?
What is difference between printf and scanf?
Explain implementation and how is it different from conversion?
What is object cloning in Java?
What are the two types of streams offered by java 8?
Why singleton pattern is better than creating singleton class with static instance?
Is arraylist dynamic in java?
Explain the features of interfaces in java?