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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// Class instinit2
2
// Generated on Wed Feb  2 17:52:49 PST 2000
3
// The instance initializer throws a checked exception. This is OK
4
// since the constructors declares it in its `throws' clause -- at
5
// least that's what the specs are saying.
6
 
7
class instinit2 {
8
 
9
    String buffer = "Oink Oink!";
10
 
11
    {
12
        System.out.println ("Checking the oink...");
13
        if (buffer != null)
14
            throw new Exception ("It just oinked");
15
    }
16
 
17
    instinit2 () throws Exception
18
    {
19
        System.out.println ("Ctor");
20
    }
21
 
22
    public static void main (String[] arg)
23
    {
24
        System.out.println ("Testing class `instinit2'...");
25
        try {
26
            System.out.println (new instinit2 ().buffer);
27
        } catch (Exception e) {
28
            System.out.println (e.toString());
29
        }
30
    }
31
}

powered by: WebSVN 2.1.0

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