回複:求教: 關於java, 真是不太明白

來源: 2005-03-23 03:56:52 [舊帖] [給我悄悄話] 本文已被閱讀:

public boolean equals(Name otherName){
boolean same=false;
otherName=new Name();
String otherlast=new String(otherName.getLastName());
String otherMiddle= ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
String otherSur=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if( //compare last name this.getLast).getequalsIgnoreCase(otherlast); ''')
{same = true;}else{same=false;}return same;
}