What are the operands of instanceof operator?
Answers were Sorted based on User's Feedback
Answer / shaik baji
"instanceof" is a java keyword and it comes under binary
operators.
For "instanaceof" operator
the first operand is : any instance or object
the second operand is : any class name
For Ex:
-------
class Demo
{}
class InstanceofDemo
{
public static void main(String[] args)
{
Demo obj = new Demo();
if (obj instanceof Demo)
System.out.println("yes");
else
System.out.println("no");
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Infinite loop using while ?
How are this and super used?
When should the method invokelater() be used?
What is escape analysis algorithm in JVM and how garbage collection actually worked n how it transfer the objects from one kind of space to other?
Can we make main() thread as daemon?
What is a Transient Object?
0 Answers InfoAxon Technologies,
What is a buffer in java?
What is difference between java and java ee?
Explain the importance of throwable class and its methods?
Can we have static methods in an interface?
what is the swingutilities.invokelater(runnable) method for? : Java thread
Where are the card layouts used?