toString1 이펙티브 자바 - toString 재정의 - 이 글은 Effective Java 를 기반으로 작성되었습니다. - toString 의 default 구현 toString 을 별도로 재정의 하지 않고 그냥 사용하게 될 경우 기본형은 클래스명@16진수와 같은 형태를 띄게 된다. 프로그램에 특별히 해를 끼치는것은 아니지만 사람이 보기에 그다지 유용한 정보는 아니다. /** * Returns a string representation of the object. In general, the * {@code toString} method returns a string that * "textually represents" this object. The result should * be a concise but informative representation .. 2021. 10. 4. 이전 1 다음