Answer Posted / 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 |
Post New Answer View All Answers
What was java originally called?
What is Gang of four design patterns
what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread
Write a program in java to calculate the difference between the sum of the odd level and even level nodes of a binary tree.
What do you mean by object?
Is java developer a good career?
What defines function?
What is the difference between heap and stack memory?
placement papaers of spring computing technology
What is a stack class in java ?
Can we change the scope of the overridden method in the subclass?
Can we able to pass objects as an arguments in java?
what are the high-level thread states? : Java thread
From the two, which would be easier to write: synchronization code for ten threads or two threads?
Describe string intern() methodology