source: trunk/gcc/libjava/testsuite/libjava.lang/anfi.java

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 797 bytes
Line 
1// Class anfi
2// Generated on Sat Jan 29 16:06:33 PST 2000
3// Anonymous with access to outer context locals
4
5class 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
29interface itf {
30 void setString (String s);
31 String getString();
32 String buff = null;
33}
Note: See TracBrowser for help on using the repository browser.