OSDN Git Service

PR libgcj/12656:
[pf3gnuchains/gcc-fork.git] / libjava / testsuite / libjava.lang / Invoke_1.java
1 // Test of failing method invocation.
2
3 public class Invoke_1
4 {
5   public void call_me ()
6     {
7       System.out.println ("no");
8     }
9
10   public static Invoke_1 get_i ()
11     {
12       return null;
13     }
14
15   public static void main (String[] args)
16     {
17       Invoke_1 i = get_i ();
18       try
19         {
20           i.call_me ();
21         }
22       catch (NullPointerException ok)
23         {
24           System.out.println ("ok");
25         }
26     }
27 }