자료구조 : 자바 comparable 인터페이스/오버라이드 String one = "hello world"; String two = "hello world"; if(one.equals(two)) { System.out.println("they are the same"); 위의 코드에서 equals 메서드가 어디서 왔는가? -> 문자열에서 왔다 -> 정확히는 객체의 equals 메서드를 오버라이드 했다 (원래의 메서드 오버라이드) Object o = one; //형변환 Object t = two; if(o.equals(t)) 객체를 비교할 때는 메모리 주소를 비교하고 문자열 클래스를 비교할 때는 메모리 주소를 비교하지 않는다 객체(원숭이)가 같은지 비교 Monkey m = new Monkey(); Monk..