Java Language Specification, Version Java SE 21 Edition
15.12. Method Invocation Expressions14 Documented Misconceptions
CallNotStaticallyChecked
A method invocation on a reference of a type that does not have that method won't compile
CallRequiresVariable
One needs a variable to invoke a method
CallOnPrimitive
One can invoke a method on primitive values
CannotChainMemberAccesses
Member accesses cannot be chained together
CannotChainMemberToConstructor
Method calls or field accesses cannot be chained to a constructor invocation
ChainedMethodsNotCalledFromOutside
Chained methods are all called on the object at the beginning of the chain
LiteralString
When passing a literal string as argument to a method, no quotes are needed
NoCallOnStringLiteral
One cannot invoke methods on String literals
OutsideInMethodNesting
Nested method calls are invoked outside in
ParenthesesOnlyIfArgument
() are optional for method calls without arguments
RightToLeftChaining
Chained accesses are invoked from right to left
StaticCallPolymorphic
A static method call is dispatched polymorphically at runtime based on the argument types
StaticDispatch
The method to be called is determined by the static type
SuperAlwaysHasParentheses
To call a method on a superclass, parentheses are needed after the keyword super