为什么此代码块返回false ...
string
...当此代码块返回true时?
char ra1= '\u30E9';
char ra2= '\u30E9';
Character RA1= ra1;
Character RA2= ra2;
System.out.println("Does Character RA1 == Character RA2? " + (RA1 == RA2)); //returns false
他们似乎对我做了同样的事情,并且char a1= 'a';
char a2= 'a';
Character A1= a1;
Character A2= a2;
System.out.println("Does Character A1 == Character A2? " + (A1 == A2)); //returns true
都保持相同的Characters
值,所以我不明白为什么char
会返回{ {1}}为{1}}为==
为