상속

상속

접근제어자 class 자식클래스명 extends 부모클래스명 {
	//클래스 내용
}

특징

단일 상속(Single Inheritance)

모든 클래스는 Object 클래스를 상속

생성자는 상속되지 않음

상속의 필요성

코드 재사용성(Code Reusability)

확장성(Extensibility)

유지보수성(Maintainability)

다형성 구현(Polymorphism)

상속 VS구성

상속(Inheritance)

구성(Composition)

상속 장단점

장점

단점

메서드 재정의(Method Overriding)

메서드 재정의

method overriding 이란

overriding의 조건

super, super()

super 키워드이 역할

super()생성자 호출 규칙

super와 this의 차이점

Annotation

Annotation

기본 Annotation

@Deprecated

@Override

@SuppressWarnings

접근 제어자(Access Modifier)

접근제어자