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 the difference between numeric and integer?
Explain with example the concept of constant variable in java.
Is it possible to use Semaphore/ Mutex in an Interrupt Handler?
What is nested interface?
What do you mean by local class?
I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com
What is the difference between JDBC 1.0 and JDBC 2.0?
What is the difference between error and an exception?
How does thread synchronization occurs inside a monitor?
Give an example of use of pointers in java class.
Is java free for commercial?
Can we define a package statement after the import statement in java?
What is the equal sign?
What is java beans?
Can we access instance variables within static methods ?