waltermilner

Untitled

Aug 25th, 2016
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. public class Test extends Base {
  2.  
  3.   void m()
  4.   { System.out.println("No exception");}
  5.  
  6.   public static void main(String[] args) {
  7.  
  8.     Test t = new Test();
  9.     t.m();
  10.  
  11.   }
  12.  
  13. }
  14.  
  15. class Base
  16. {
  17.   void m() throws Exception
  18.   {
  19.     throw new Exception();
  20.   }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment