锘??xml version="1.0" encoding="utf-8" standalone="yes"?>一区二区三区av,国产午夜精品理论片a级大结局,欧美a视频在线http://www.aygfsteel.com/yihui/category/1471.html<font face="瀹嬩綋" size="2"><strong>浜嬩笟鍚戝乏...鐖辨儏鍚戝彸...澶卞幓鐨?..鎴戜細(xì)鍦ㄦ湭鏉ユ湡寰?..</strong></font>zh-cnWed, 28 Feb 2007 07:43:54 GMTWed, 28 Feb 2007 07:43:54 GMT60J2SE鍩虹鐭ヨ瘑涔嬩笉瑕佷緷鎳扥bject.equals();http://www.aygfsteel.com/yihui/articles/6411.html涓杈?/dc:creator>涓杈?/author>Mon, 20 Jun 2005 15:47:00 GMThttp://www.aygfsteel.com/yihui/articles/6411.htmlhttp://www.aygfsteel.com/yihui/comments/6411.htmlhttp://www.aygfsteel.com/yihui/articles/6411.html#Feedback1http://www.aygfsteel.com/yihui/comments/commentRss/6411.htmlhttp://www.aygfsteel.com/yihui/services/trackbacks/6411.html
public class Computer{
銆銆
private String cpuInfo;
銆銆
private String diskInfo;
銆銆
銆銆
public Computer(String cpuInfo,String diskInfo){
          銆
this.cpuInfo = cpuInfo;
    銆銆銆
this.diskInfo = diskInfo;
   銆銆}

銆銆
public String toInfo(){
銆銆銆銆
return new StringBuffer("cpu:").append(cpuInfo).append("disk:").append(diskInfo).toString();
銆銆銆}


//other methods
}


public class Test{
  
static public void main(String [] args){
銆銆Computer c1 
= new Computer("AMD-XP1800","IBM-3002");
銆銆Computer c2 
= new Computer("AMD-XP1800","IBM-3002");
     
if(c1.equals(c2))
  銆銆銆System.
out.println("c1==c2");
    銆
else
 銆銆銆 System.
out.println("c1!=c2");

銆銆}

}


浠g爜鐨勮繍琛岀粨鏋滀負(fù)錛歝1!=c2銆備竴寮濮嬫劅瑙夊簲璇ユ湁鐐規(guī)剰澶栧惂錛佽繖涓緥瀛愬憡璇夋垜浠紝涓嶈渚濊禆Object鐨勯粯璁ゅ疄鐜幫紝Object 鎻愪緵鐨別quals鏂規(guī)硶濡備笅錛?BR>
public boolean equals(Object obj){
return (this == obj);
}


Object 鐨? =榪愮畻鍙繘琛孫bject鐨勫紩鐢ㄧ殑姣旇緝錛屼篃灝辨槸鍐呭瓨鍦板潃鐨勬瘮杈冿紒

鐜板湪鎯充竴鎯籌紝瑕佹槸涓寮濮嬩笉娉ㄦ剰鐨勮瘽錛岄偅緇撴灉鏄涔堟剼锠㈠惂錛?img src ="http://www.aygfsteel.com/yihui/aggbug/6411.html" width = "1" height = "1" />

]]>
主站蜘蛛池模板: 新昌县| 徐汇区| 垣曲县| 宁夏| 玛沁县| 武定县| 博兴县| 宝兴县| 白朗县| 元氏县| 阿巴嘎旗| 江山市| 长宁区| 肇源县| 津南区| 嘉义市| 海晏县| 湖南省| 泰州市| 北京市| 邛崃市| 开封市| 手机| 南靖县| 庆阳市| 丹江口市| 繁峙县| 郯城县| 恭城| 福州市| 平果县| 桐梓县| 河西区| 泗阳县| 盱眙县| 舒兰市| 原平市| 伊金霍洛旗| 新闻| 喜德县| 铜梁县|