Skip to main content

All Questions

27 votes
4 answers
21k views

Why is there no 'subclasses-only' access modifier in Java?

In Java, there are four available access modifiers for methods: public - any class can use this method. protected - classes in the same package and subclasses in any package can use this method. ...
Aviv Cohn's user avatar
  • 21.5k
7 votes
5 answers
1k views

Java without implementation inheritance

In a recent video on Java, Joshua Bloch states at 4 minutes 20 seconds into the video: And then there's inheritance, and that was a marketing necessity. You know, we can argue whether you really ...
fredoverflow's user avatar
  • 6,954