标题:我不会~!
取消只看楼主
汉朝天子
Rank: 1
等 级:新手上路
帖 子:19
专家分:0
注 册:2004-11-12
 问题点数:0 回复次数:1 
我不会~!
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呀??真奇怪啊!
搜索更多相关主题的帖子: MyDate int public month year 
2005-06-02 18:38
汉朝天子
Rank: 1
等 级:新手上路
帖 子:19
专家分:0
注 册:2004-11-12
得分:0 
二楼教训的是!
本人一定虚心学习!
2005-06-04 13:57



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-19934-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.038810 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved