gcc/libjava/testsuite/libjava.lang/Throw_1.java

26 lines
332 B
Java
Raw Normal View History

1999-04-07 22:42:40 +08:00
// 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");
}
}
}