자바 part.4 문제풀이 - 인터페이스와 상속 활용하기
예제 class Person{ //Field String name; int age; int weight; //Constructor Person(){} Person(String name,int age, int weight){ this.name = name; this.age = age; this.weight = weight; } //Method void wash() {System.out.println("씻다.");} void study() {System.out.println("공부하다.");} void play() {System.out.println("놀다.");} } interface Allowance{ //Field //변수는 안되나 상수는 되므로 상수로 지정해주면 됨 -> public static fi..