please write java program of instanceOf keyword implementation
Answers were Sorted based on User's Feedback
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 |
what is object deep copy and shallow copy and why it is required?
What are assembly attributes?
Is hashset ordered?
What is meant by javabeans?
What is xslt in java?
What are the different types of inner classes?
What is append in java?
Explain the difference between scrollbar and scrollpane?
What is a jagged array in java?
Difference between static binding and dynamic binding?
what is private constructor?what are the uses of writing private constructor in our program?
Is cout buffered?