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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 765 jeremybenn
// Class anfi
2
// Generated on Sat Jan 29 16:06:33 PST 2000
3
// Anonymous with access to outer context locals
4
 
5
class anfi {
6
 
7
    itf foo (final String s, final int i) {
8
        return new itf () {
9
            String buff = s+" "+i;
10
            public void setString (String s) { buff = s+" "+i; }
11
            public String getString () { return buff; }
12
        };
13
    }
14
 
15
    void test () {
16
        itf x = foo ("Hello", 123);
17
        System.out.println (x.getString ());
18
        x.setString ("Frinkahedron");
19
        System.out.println (x.getString ());
20
    }
21
 
22
    public static void main (String[] arg)
23
    {
24
        System.out.println ("Testing class `anfi'...");
25
        new anfi().test();
26
    }
27
}
28
 
29
interface itf {
30
    void setString (String s);
31
    String getString();
32
    String buff = null;
33
}

powered by: WebSVN 2.1.0

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