오버로딩 썸네일형 리스트형 [JAVA] 이것이 자바다 6장 확인 문제 : Printer 클래스에서 println( ) 메소드 오버로딩하여 선언하기 public class Printer { int println(int value){ System.out.println(value); return value; } boolean println (boolean value) { System.out.println(value); return value; } double println (double value) { System.out.println(value); return value; } String println (String value) { System.out.println(value); return value; } } public class PrinterExample { public static void main(String[] args) { Printer .. 더보기 [Java] 이것이 자바다 6장 확인 문제 1 : this()를 활용해서 중복 코드 제거하기 Q.Board 클래스의 생성자가 다음과 같이 오버로딩되어 있습니다. 생성자마다 중복 코딩된 부분이 있습니다. this( )를 활용해서 중복 코드를 제거해보세요. public class Board { String title; String content; String writer; String date; int hitcount; Board(String title, String content){ this.title = title; this.content = content; this.writer = "로그인한 회원아이디"; this.date = "현재 컴퓨터 날짜"; this.hitcount = 0; } Board(String title, String content, String writer){ this.tit.. 더보기 이전 1 다음