Help Center

Local Navigation

Evaluating conditions using instanceof

To produce smaller and faster code, if you evaluate a condition using instanceof, do not evaluate explicitly whether the variable is null.

Code sample

if( e instanceof ExampleClass ) { ... }
if( ! ( e instanceof ExampleClass ) ) { ... }

Index


Was this information helpful? Send us your comments.