OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [Invoke_1.java] - Blame information for rev 830

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.