Example1 of instanceOf Operator.
If the object referred by the variable on the left side of the operator passes the IS-A check for the class/interface type on the right side, then the result will be true.
Following is the example:
- String name = = 'James';
- boolean result = name instanceOf String;
- // This will return true since name is type of String