为什么是这样?
String str1 = "one";
String str2 = "two";
System.out.println(str1.equals(str1 = str2)); // false, doesn't assignment of ref. to string object memory location happens after???
System.out.println(str1.equals(str1 = str2)); // true, same statement
Run Code Online (Sandbox Code Playgroud)
我在模拟面试中被问到这个问题,但我仍然不明白。