1 public class pr184 2 { main(String[] args)3 public static void main(String[] args) 4 { 5 pr184 n = null; 6 try 7 { 8 n.foo(); 9 } 10 catch (NullPointerException x) 11 { 12 System.out.println(x); 13 } 14 } 15 16 int x = 2; 17 foo()18 final int foo() 19 { 20 return x; 21 }; 22 } 23