String is a 'special' object in java. It's an immutable object (Fixed and cannot be modified), and would be the only object that can be declared without the new keyword.
If you use StringBuilder, StringBuffer those are mutable String and your values will be modified upon change.
When you dive deeper, Java String comes with many confusing understanding. When you use "==", 2 different string with same value returns the same reference of the memory address. Eg.
String a1 = "abc"
String a2 = "abc"
a1 == a2 //returns true because a1 and a2 points to same reference (but not always!)
a1 == new String("abc") //returns false
/**Do use "equals", not == for string's value comparison**/
If you can wrap your mind around memory object references:
String s1 = "Hello, World!"; //let's say it's allocated to memory address 0x0012
String s2 = s1; //s2 points to same memory address 0x0012
s1 = "Goodbye, World!"; //s1 points to new memory address 0x1113
System.out.println(s2) //printing value in still in memory address 0x0012
It's equivalent as, s1 points to new Object, s2 points to the old Object.
and when you refer back to your Point example
Point p1 = new Point(1, 1);
Point p2 = p1; //p2 is referring to p1's memory address
p1.x = 5;
p1 = new Point(2,2); //Assign to new memory address, here is like the line for s1="Goodbye,world"
System.out.println(p2.x); //You now still get 5, because it's still old object.
So to fix a string that is mutable, you need something like "Class"."method" to change in order to retain the same object being modified. Hence something like:
StringBuilder sb1 = new StringBuilder("Hello World");
StringBuilder sb2 = sb1; //Points to same reference address.
sb1.append("Goodbye World");
System.out.println(sb2.toString()); //Now you get Hello WorldGoodbye World.
sb1.setLength(0).append("Goodbye World"); //clear then set to new value.
System.out.println(sb2.toString()); //Now you get Goodbye World.