Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class CommonSomething {
- final public void doSomething() {
- doSomethingCommon();
- doSomethingSpecial();
- }
- private void doSomethingCommon() {
- }
- abstract protected void doSomethingSpecial();
- }
- class ASomething extends CommonSomething {
- protected void doSomethingSpecial() {
- }
- }
- class BSomething extends CommonSomething {
- protected void doSomethingSpecial() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement