O'Reilly logo

The Java® Language Specification, Java SE 7 Edition, Fourth Edition by Alex Buckley, Gilad Bracha, Guy Steele, Bill Joy, James Gosling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required