| instanceof |
|
grammar |
| |
Compares the type of the object on the left to the type name
supplied on the right and results in a non-zero value
if they are the same and zero otherwise.
Its usage description can be summarized as follows:
Expression:
UnaryExpression instanceof name
| |
| Example: |
Some instances of
instanceof
are shown below:
import yoix.stdio.*;
if (5 instanceof int)
puts("5 is an int");
else
puts("5 is not an int");
String name = "Fripp";
if (name instanceof String)
puts("name is a String");
else
puts("name is not a String");
with the resulting output:
5 is an int
name is a String
| | |
| See Also: |
reference
|
|
Yoix is a registered trademark of AT&T Intellectual Property.
|