String a = "hello"; // a is a reference to the "hello" string objectString b = a; // b is a reference to the same "hello" string objecta = "bye"; // a is updated to reference the "bye" string object // b is still referencing the "hello" string objectSystem.out.println(b); // "hello" is printed