|
Last change
on this file since 3103 was 2, checked in by bird, 23 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:
574 bytes
|
| Line | |
|---|
| 1 | // Class anon4
|
|---|
| 2 | // Generated on Wed Dec 29 10:07:09 PST 1999
|
|---|
| 3 | //
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | class anon4 {
|
|---|
| 7 |
|
|---|
| 8 | private int field = 3;
|
|---|
| 9 |
|
|---|
| 10 | itf bar () {
|
|---|
| 11 | return new itf () {
|
|---|
| 12 | int count = 5;
|
|---|
| 13 | public void setCount (int j) { count = 3+field; }
|
|---|
| 14 | public int getCount () { return count+field; }
|
|---|
| 15 | } ;
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | void test () {
|
|---|
| 19 | itf x = bar ();
|
|---|
| 20 | System.out.println (x.getCount ());
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | public static void main (String[] arg)
|
|---|
| 24 | {
|
|---|
| 25 | System.out.println ("Testing class `anon4'...");
|
|---|
| 26 | new anon4 ().test ();
|
|---|
| 27 | }
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | interface itf { void setCount (int j); int getCount(); int count = 0; }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.