Advertisement
Guest User

Untitled

a guest
Jul 29th, 2018
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. abstract class CommonSomething {
  2.  
  3.   final public void doSomething() {
  4.     doSomethingCommon();
  5.     doSomethingSpecial();
  6.   }
  7.  
  8.   private void doSomethingCommon() {
  9.    
  10.   }
  11.  
  12.   abstract protected void doSomethingSpecial();
  13. }
  14.  
  15. class ASomething extends CommonSomething {
  16.  
  17.   protected void doSomethingSpecial() {
  18.    
  19.   }
  20. }
  21.  
  22. class BSomething extends CommonSomething {
  23.  
  24.   protected void doSomethingSpecial() {
  25.    
  26.   }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement