Answers:

The special operators, such as instance of and dot operators are used to perform certain specialized operations. The instance of operator is a binary operator that checks whether or not an object is of a particular type (type can be a class, interface, or an array). It is used for object reference variables only. The syntax to use the instance of operator is as follows:

<object Reference> instanceof <XxxType>

In the preceding syntax, the left-hand operand of the instanceof operator is object reference, which must be an instance (or we can say an object) of a class while the right-hand operand (XxxType) can be a class, interface, or an array type. The instanceof operator returns true if the object mentioned on the left-hand side is an instance of the type that is mentioned at the righthand side of this operator; otherwise, it (instanceof operator) returns false.

Apart from the instanceof operator, in Java, you also use the dot (.) operator to invoke methods in a class, as shown in the following code snippet:

X x;
x.go();

In the preceding code snippet, the x instance of the X class is followed by the dot (.) operator to invoke the method, that is, member of the X class