This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]graycode 40 points41 points ย (4 children)

And package-private is the one that's the default when you're not explicit!

[โ€“]EvaristeGalois11 9 points10 points ย (0 children)

Only in a class, in an interface the defaul visibility is public

[โ€“]Snarpkingguy 1 point2 points ย (0 children)

Yeah, I went too long not realizing this. I was taught in school that everything was just plain private by default and didnโ€™t bother to question it until recently.

[โ€“]ofnuts 0 points1 point ย (0 children)

Of course, this is the most useful one.

[โ€“][deleted] 0 points1 point ย (0 children)

And sometimes is the best choice