Extends - #17
Open
daadaadaah wants to merge 9 commits into
Open
Conversation
- Parant 클래스를 호출하지 않았는데도 부모 클래스의 기본 생성자가 호출 된다. - 자식 클래스에 구현하지 않았는데도 부모 클래스에 있는 printName() 메소드를 자식 클래스에서 사용할 수 있다. > 출력 결과 Parent Constructor Child Constructor Parent printName()
…사용함. > 출력 결과 Parent Constructor Child Constructor Parent printName() Parent printProtectedName()
> 출력 결과 [Overriding 전] ParentArg(ChildArgName ~~~ ) Constructor Child Constructor ParentArg printName() [Overriding 후] ParentArg(ChildArgName ~~~ ) Constructor Child Constructor ChildArg printName() Overriding
왜냐하면, 자식에게만 존재하는 변수나 메서드가 있는데, 이를 부모로부터 참조할 수 없으므로,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.