class test{
public static void main(String args[]){
String str1 = "2019";
String str2 = "20192";
String str3 = "20192";
boolean boo1 = str1.equals(str2);
boolean boo2 = str2.equals(str3);
System.out.println("返回值 " + boo1);
System.out.println("返回值 " + boo2);
}
}
执行结果:
返回值 false
返回值 true