KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > FinalFieldTest


1 import java.util.*;
2
3 public class FinalFieldTest {
4
5     private final LinkedList attributes = new LinkedList(new MyAttributeColl());
6
7     public static void main(String JavaDoc [] args){
8         System.out.println("Hi");
9         FinalFieldTest fft = new FinalFieldTest();
10         fft.run();
11     }
12
13     public void run() {
14         System.out.println(attributes.toString());
15     }
16
17     private class MyAttributeColl extends ArrayList {
18     
19         public String JavaDoc toString(){
20             return "Jennifer";
21         }
22     }
23 }
24
Popular Tags