这是我要比较的课程:
public class test
{
private String str=null;
private int integer=0;
private double doubleNum=1.1;
}
现在我通过实例化两个相同的类来比较它
public class testEquals
{
public static void main(String[] args)
{
test s1 = new test();
test s2 = new test();
System.out.print(s1.equals(s2));
}
}
结果是
错误的