Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


What are the operands of instanceof operator?

Answers were Sorted based on User's Feedback



What are the operands of instanceof operator?..

Answer / ravikiran(aptech mumbai)

object and class

Is This Answer Correct ?    7 Yes 0 No

What are the operands of instanceof operator?..

Answer / sireeshabojedla

Object and class

Is This Answer Correct ?    2 Yes 0 No

What are the operands of instanceof operator?..

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

Post New Answer



More Core Java Interview Questions

How to create com object in Java?

0 Answers  


What methods are called, When we navigate from one applet to another applet?

1 Answers  


Java run-time system generates What class of exceptions?

2 Answers   TCS,


How transient variable is different from volatile variable?

0 Answers  


How does hashset work in java?

0 Answers  






What are the override methods in Object class?

2 Answers   Tech Mahindra, Wipro,


Should you use singleton pattern?

0 Answers  


Difference between flush() and commit() in hibernate?

2 Answers   Bally Technologies,


Can a class have multiple superclasses?

0 Answers  


What is abstract class constructor called?

0 Answers  


How we can run a jar file through command prompt in java?

0 Answers  


what is optional in java 8?

0 Answers  






Categories