(Effective Java) Item26 퍼펙트 어택. 일반 저장소
제26조. 원시 유형을 사용하지 마십시오. 일반 다오 만들기 Generic을 사용하여 중복 코드를 제거하는 이점을 보여주기 위해 강의 중에 간단한 저장소를 만들었습니다. public interface Entity { Long getId(); } public class Account implements Entity { private Long id; private String username; public Account(Long id, String username) { this.id = id; this.username = username; } @Override public … Read more