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 is java and its types?
What is the default value of byte datatype in java?
what is encapsulation in java? Explain
What is the main functionality of the remote reference layer?
What is synchronization and why is it important in java programming?
Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?
Explain notifyall() method of object class ?
What is role of void keyword in declaring functions?
When is the finalize() called?
What is a variable in java?
Why do we use return statement?
why Java does not support multiple inheritances?
What are data types in programming?
Can we override static methods in java?
How to convert string to byte array and vice versa?