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 meant by polymorphism?
Is java ee a framework?
Are arrays classes in java?
if num=687; U have to get num=6+8+7;
What is the purpose of garbage collection in java?
What is boolean data type in java?
What is the importance of main method in Java?
When we can access the static data member without creating the object what is the need of the object in java.
5 Answers Airhub, ssinformatics,
Is string pool garbage collected?
Explain in detail about encapsulation with an example?
What is entry in java?
What is natural ordering in java?