Skip to content

[Plus] private 와 final의 차이 #152

Answered by nusuy
yerim123456 asked this question in Q&A
Discussion options

You must be logged in to vote

메소드를 private으로 지정 -> 상속이 안 됨. (상속이 되지 않기 때문에 오버라이딩은 당연히 안 됨!)
메소드를 final으로 지정 -> 상속은 되지만, 오버라이딩이 안 됨.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hyojeongchoi
Comment options

Answer selected by yerim123456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants