Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. abstract class Super {
  2.  
  3. protected void finalize() {
  4.  
  5. }
  6.  
  7. public void doThings() {
  8. // do stuff
  9. finalize();
  10. }
  11. }
  12.  
  13. class Sub extends Super {
  14.  
  15. @Override
  16. protected void finalize() {
  17. closeSockets();
  18. alertSomeone();
  19. }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement