반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- 구글 보안 api 활용
- controller
- Testcode
- jpa
- Validation
- springSecurityFilterChain 오류
- 신문법 abap
- spring MVC
- new syntax
- memory변수명 변경
- abap
- MVC
- mapping corresponding
- SAP
- .orelseThrow
- @Controller
- SpringMVC
- sap memory
- memory 정리
- abap memory
- abap value in field Data Class error
- application-properties
- value base corresponding
- optional
- 김영한
- abap면접
- n+1
- for all entries in
- BindingResult
- spring
Archives
- Today
- Total
SAP공장
extends , interface 언제 써야 할까? 본문
반응형
결론
Class 가 Class를 상속 : extends
Class 가 interface를 상속 : implements
Interface 가 Class를 상속 : extends
Interface 가 interface를 상속 : extends
Java에는 다중 상속이 지원이 되지 않는다.
따라서, 일반 상속(1개 상속)시 에는 extends를 사용한다.
그러나 다중 상속을 지원할수 있는 방법이 존재!
implements의 사용이다.
extends는 1개의 클래스만 상속 받을수 있고, 자식 클래스는 부모 클래스들의 기능들을 사용이 가능하다!.
implements는 여러개의 interface들을 상속 받을 수 있지만 부모 기능들을 모두다 @Override해서 사용해야한다!
반응형
'[WEB]Back-end > Java' 카테고리의 다른 글
ArrayList vs HashMap ,HashMap vs HashTable, 제네릭이란? (0) | 2022.02.10 |
---|---|
static, final, 필드, 메소드, 인스턴스 의미 정리 (0) | 2022.01.26 |
java 에서 this가 뭐야? (0) | 2022.01.20 |
int 와 Integer의 차이점 (0) | 2022.01.16 |
Abstract 과 interface 비교 (0) | 2022.01.10 |