Anonymous

What Is 'Instance Of' Operator In Java?

3

3 Answers

Shameer KPO Profile
Shameer KPO answered
A member or method declared in class is an instance of the class.
Class A
{
x()
{
}
}

Here, x() is an instance of Class A.
Florio Potter Profile
Florio Potter answered

The java instanceof operator is used to test whether the object is an instance of the specified type (class or subclass or interface). The instanceof in java is also known as type comparison operator because it compares the instance with type. It returns either true or false.

For more information get help at

CodeAvail- Online Computer Science Assignment
help

Anonymous Profile
Anonymous answered
The instance of operator can be useful to call a method based explicitly on th class of same object instead of implicitly using an overridden method and polymorphism

Answer Question

Anonymous