15.12. Method Invocation Expressions
A method invocation expression is used to invoke a class or instance method.
MethodInvocation: MethodName (
ArgumentListopt )
Primary .
NonWildTypeArgumentsopt Identifier (
ArgumentListopt )
super .
NonWildTypeArgumentsopt Identifier (
ArgumentListopt )
ClassName . super .
NonWildTypeArgumentsopt Identifier (
ArgumentListopt )
TypeName .
NonWildTypeArguments Identifier (
ArgumentListopt )
The definition of ArgumentList from §15.9 is repeated here for convenience:
ArgumentList: Expression ArgumentList ,
Expression
Resolving a method name at compile time is more complicated than resolving a field name because of the possibility of method overloading. Invoking a method at run time is also ...
Get The Java® Language Specification, Java SE 7 Edition, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.