Contents | Prev | Next | Index

instanceof

S cannot be an interface type, because there are no instances of interfaces, only instances of classes and arrays.

Linking Exceptions
During resolution of the CONSTANT_Class constant pool item, any of the exceptions documented in §5.1 can be thrown.

Notes
The instanceof instruction is fundamentally very similar to the checkcast instruction. It differs in its treatment of null, its behavior when its test fails (checkcast throws an exception, instanceof pushes a result code), and its effect on the operand stack.


Contents | Prev | Next | Index

Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com