package num1;
public class A2 {
public static void main(String[] args){
String a="hello2";
final String b="hello";
String d="hello";
String c=b+2;
String e=d+2;
System.out.println((a==c));
System.out.println((a==e));
}
}
结果是
true
false
我检测过,结果C和E输出的都是hello2.求教,谢谢!
摩诃迦叶