자바 키워드 implements

Jmnote (토론 | 기여)님의 2022년 4월 29일 (금) 13:02 판 (→‎같이 보기)

1 개요

implements
임플리먼츠, 임플러먼츠 [ímpləmənts]
interface Animal {
  public void animalSound();
}
class Duck implements Animal {
    public void animalSound() {
        System.out.println("Quack");
    }
}
public class MyClass {
    public static void main(String[] args) {
        Animal a = new Duck();
        a.animalSound();
    }
}

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}