锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产综合视频在线观看,一区二区三区视频播放,国产精品一区二区三区免费观看
http://www.aygfsteel.com/yihui/category/1471.html<font face="瀹嬩綋" size="2"><strong>浜嬩笟鍚戝乏...鐖辨儏鍚戝彸...澶卞幓鐨?..鎴戜細鍦ㄦ湭鏉ユ湡寰?..</strong></font>zh-cnWed, 28 Feb 2007 07:43:54 GMTWed, 28 Feb 2007 07:43:54 GMT60- J2SE鍩虹鐭ヨ瘑涔嬩笉瑕佷緷鎳扥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爜鐨勮繍琛岀粨鏋滀負錛歝1!=c2銆備竴寮濮嬫劅瑙夊簲璇ユ湁鐐規剰澶栧惂錛佽繖涓緥瀛愬憡璇夋垜浠紝涓嶈渚濊禆Object鐨勯粯璁ゅ疄鐜幫紝Object 鎻愪緵鐨別quals鏂規硶濡備笅錛?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" />
]]>
主站蜘蛛池模板:
安丘市|
观塘区|
石景山区|
扬州市|
右玉县|
郑州市|
东港市|
霍邱县|
余庆县|
荔波县|
泰宁县|
德安县|
万盛区|
武穴市|
黄山市|
定南县|
德惠市|
交口县|
明星|
吴旗县|
雷山县|
大埔县|
高密市|
秦皇岛市|
蚌埠市|
车致|
通山县|
壶关县|
文昌市|
乌鲁木齐县|
舞钢市|
澄江县|
政和县|
比如县|
崇礼县|
伊春市|
莲花县|
云霄县|
沅江市|
宝鸡市|
乐都县|