O'Reilly logo

Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition by Rolf W. Rasmussen, Khalid A. Mughal

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

3.17. Parameter Passing

Objects communicate by passing messages (see Section 1.4, p. 7). A message is implemented as a method call to invoke a particular method on an object. Static methods can be invoked on classes in Java. Parameters in the method call provide one way of exchanging information between the caller object and the callee object (which need not be different). Defining methods is discussed in Section 4.3.

The syntax of a method call can be any one of the following:

<object reference>.<method name> (<actual parameter list>)   <class name>.<static method name> (<actual parameter list>)   <method name> (<actual parameter list>)

The <object reference> must be an expression that evaluates to an object reference. If the caller and the ...

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