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 the purpose of extern variable?
what is predefined function in java?
What is object class in java?
What is type safety in java?
What is the size of string?
Can an interface extend another interface?
Is null an object in java?
what r callable statement and give their proper use
Garbage collection in java?
What is a instance variable in java?
Are global variables initialized to zero?
What is the final class?