February 2014
Beginner
1248 pages
62h 25m
English
• When an argument is passed by reference (p. 265), the called method can access the argument’s value in the caller directly and possibly modify it.
• All arguments in Java are passed by value. A method call can pass two types of values to a method—copies of primitive values and copies of references to objects. Although an object’s reference is passed by value (p. 265), a method can still interact with the referenced object by calling its public methods using the copy of the object’s reference.
• To pass an object reference to a method, simply specify in the method call the name of the variable that refers to the object.
• When you pass an array or an individual array element of a reference type ...
Read now
Unlock full access