Specifications

Sun Services
Java™ Programming Language
Module 3, slide 30 of 37
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Pass-by-Value
24
25 // Assign the date
26 date = new MyDate(22, 7, 1964);
27 // Try to change it
28 changeObjectRef(date);
29 // What is the current value?
30 System.out.println("MyDate: " + date);
The result of this output is:
MyDate: 22-7-1964