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
When should I use stringbuffer?
Explain inner classes ?
What is a stringbuffer?
What is mysql driver class name?
What are the types of casting?
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?
What is ordered map in java?
Can a list be null in java?
Can you start a thread twice in Java?
How to create packages in java?
Can we overload the constructors?
What is the advantage of preparedstatement over statement?
Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.
Explain the reason behind ending a program with a system.exit(0)?
What is an empty string in css?