summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/Throw_1.java
blob: 4a0780aec063d7d91d3af0b1aceaebde6d4efd25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Some tests of `throw'.

public class Throw_1
{
  public static Throwable get ()
    {
      return null;
    }

  public static void main (String[] args)
    {
      Throwable t = get ();
      try
	{
	  throw t;
	}
      catch (NullPointerException y)
	{
	}
      catch (Throwable x)
	{
	  System.out.println ("no");
	}
    }
}