13. Instanceof operator : (Example InstanceOf.java ) Test the class of an object at runtime, the left argument can be any variable or array element whereas the right operand must be a class,interface or array type. The instanceof operator return true if the class of left argument is the same as, or is some subclass of the class specified by right argument. The right operand may be an interface. In such case the test determines if the object at left argument implement the specified interface.
25. The two pieces of the for statement are declaration The newly declared block variable, of a type compatible with the elements of the array you are accessing. This variable will be available within the for block, and its value will be the same as the current array element. expression This must evaluate to the array you want to loop through. This could be an array variable or a method call that returns an array. The array can be any type: primitives, objects, even arrays of arrays.