Why does the instanceof operator not use the notation on the stone?

Foo bar = new Foo(); if(bar instanceof Foo){ ... // it true } 

I'm just wondering why we are not using the camel notation ( instanceOf ) instead of it ( instanceOf ).

+6
source share
3 answers

instanceof is an operator and a reserved word, not a method or variable. The Camel case is used in Java for method names and variable names.

+11
source

since instanceof is an operator, Camel casing is for methods and variables

+1
source

the method name is defined as lowerCamelCase https://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.3-method-names

and operators are predefined characters

+1
source

Source: https://habr.com/ru/post/980163/


All Articles