What is the best way to do the following:
List list = new LinkedList(); for(int i=0; i<30;i++) { MyObject o1 = new MyOb
What you could do (though that wouldn't make much sense either), is to use a Map instead of a List
Map map = new HashMap(); for (int i = 0; i < 10; i++) { map.put("o" + i, new MyObject()); }