I have a question about String's immutability, namely, in the first situation the variable name does not change.
String name = "Unknown" ;
name.concat("Boy");
System.out.println (name);
But in the second case, the variable changes its value.
String name = "Unknown" ;
System.out.println (name);
name = "Test";
System.out.println(name);
Why the variable does not change in the first case, but in the second case as much as possible?