Not sure exactly what you are referring to with "precasting". There is casting
List pointList = new ArrayList();
pointList.add( new Point(0,0) );
Point p = (Point)pointList.get(0); // you must cast Object to Point here
or you can use generics to "pre-cast" and declare the type of collection
List<Point> pointList = new ArrayList<Point>();
pointList.add( new Point(0,0) );
Point p0 = pointList.get(0); // no need for the cast here
Is that what you are wondering about?
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Offline 6,757 posts
since May 2007