PPT Slide
?If a variable contains an object reference,
the fields of that object can be changed.
public static void main(String[] args) {
Body sirius = new Body("Sirius", null);
System.out.println("before: " + sirius);
System.out.println("after: " + sirius);
public static void commonName(Body bodyRef) {
bodyRef.name = "Dog Star";
Does the name field of sirius change ?
Does the value of sirius change to null?