correct typo in instanceof (#24332)
This commit is contained in:
@ -38,10 +38,10 @@ False Condition:
|
||||
int y = (x == 10) ? 5 : 9; // y will equal 9 since the expression x == 10 evaluates to false
|
||||
```
|
||||
|
||||
The instance of operator is used for type checking. It can be used to test if an object is an instance of a class, a subclass or an interface. General format-
|
||||
The `instanceof` operator is used for type checking. It can be used to test if an object is an instance of a class, a subclass or an interface. General format-
|
||||
*object **instance** of class/subclass/interface*
|
||||
|
||||
Here is a program to illustrate instanecof operator:
|
||||
Here is a program to illustrate the `instanceof` operator:
|
||||
```Java
|
||||
Person obj1 = new Person();
|
||||
Person obj2 = new Boy();
|
||||
|
Reference in New Issue
Block a user