August 2008 Archives

List의 contains 메소드를 사용할 일이 있어서 equals() 메소드에 대하여 찾다가 다음과 같은 나이스 사용 예제를 찾게 되었다. 책에다 있는 내용이니궁금한점은 책을 찾다보도록 하자.

    public boolean equals(Object otherObject){
        if (this == otherObject )
            return true;
       
        if (otherObject == null)
            return false;
       
        if (getClass() != otherObject.getClass())
            return false;
       
        CareCustomer careCustomer = (CareCustomer) otherObject;
       
        return (careCustomerId == careCustomer.careCustomerId
                && customerId == careCustomer.customerId);
    }


Recent Comments

동치미 on WP의 부활: //드루지기 안녕하
드루지기 on WP의 부활: 워드프레스 좋지요.
동치미 on 느림의 미학: [민달이] 감사합니
민달이 on 느림의 미학: 저도 여유를 가지자
동치미 on 철학을가진개발자 Vs 그렇지않은개발자: [데꾸벅] 막걸리
동치미 on 근황!: //kimgisa
kimgisa on 근황!: Email 주소 안
데꾸벅 on 철학을가진개발자 Vs 그렇지않은개발자: 장신정신 = 철학
동치미 on 근황!: 민달이님 때문이라도
민달이 on 근황!: 피드 등록해놓았으니

Sign In

About this Archive

Find recent content on the main index or look in the archives to find all content.