我不会~!
class MyDate{
private int day,month,year;
public MyDate(){}
public MyDate(int day,int month,int year){
this.day=day;
this.month=month;
this.year=year;
}
}
public class textEquals
{
public static void main(String args[]){
MyDate m1=new MyDate(11,1,2005);
MyDate m2=new MyDate(11,1,2005);
System.out.println(m1);
System.out.println(m2);
}
}
为什么m1不等于m2呀??真奇怪啊!