/* Uses JDK 5.0 Generics */ import java.util.*; class PointList { public static void main (String [] args) { List myPoints = new LinkedList(); myPoints.add(new Point(1.0,1.0)); System.out.println("Die Liste enthält " + myPoints.size()+" Punkt(e)!\n"); Iterator it = myPoints.iterator(); while(it.hasNext()) { Point b = it.next(); System.out.println("Point("+b.x+","+b.y+") "); } } } class Point { double x,y; Point(double xi, double yi) { x=xi; y=yi; }}