SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Gunny Jennings wrote:Example 2: Objects are passed by reference
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Murach are capable of far better than that.Gunny Jennings wrote: . . .
Description:
When a primitive type is passed to a method, it is passed by value. That means the method can't change the value of the variable itself. Instead, the method must return a new value that gets stored in the variable.
When a reference type (an object) is passed to a method, it is passed by reference. That means that the method can change the data in the object itself, so a new value doesn't need to be returned by the method.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |