Can anyone help me to differentiate between instanceof and instanceOf operators.
I know that the instanceof operator is used for checking an object is of particular type and its used for object reference variables only and other one instanceOf ??
I have not read about instanceOf with a capital 'O'.I think we have only one instanceof operator.As you said, the instanceof operator is used to check if an object is an instance of a specific class or interface.
instanceOf with capital O can be used as variable name. Exam creators use this to confuse you. instanceof is java keyword which checks if perticular object is instance of the type..
You might be doing whizlabs exam. It's there where I saw a questions like this. instanceOf isn't a keyword, you can use it as class name, variable name or anything.