Java字符串比较==运算符
Java字符串比较==运算符
public class Sample {
public static void main(String args[]){
String str1 = "hello";
String str2 = "hello";
System.out.println(str1 == str2);
}
}
public class Sample {
public static void main(String args[]){
String str1 = "hello";
String str2 = "hello";
System.out.println(str1 == str2);
}
}