Foo bar = new Foo();
if(bar instanceof Foo){
... // it's true
}
I was just wondering why we don't use camelcase notation (instanceOf
) instead of how it is (instanceof
).
instanceof
is an operator and a reserved word, not a method or variable. Camel case is used in Java for method names and variable names.