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 a flag and how does it work?
How to create packages in java?
Why java does not support pointers?
What is garbage collection? Can it be forced to run?
What are the different ways of implementing thread? Which one is more advantageous?
What is object
what is filters and its use?
What is the difference between pass by reference and pass by pointer?
Explain about the select method with an example?
what is recursion in java
What is a local class in java?
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.
2 Answers iGate, Seed Infotech,