I'm having a few problems looping through a vector - I can see the problem is that I'm trying to cast an object to a string, but I don't know what to do to fix it - can anyone help?
Vector seed = new Vector(5, 2); Iterator sIt = seed.iterator(); seed.add(new GrassSeed("TT10")); seed.add(new GrassSeed("TT21"));
for (Iterator i = seed.iterator(); i.hasNext();) { String name = (String) i.next(); System.out.println(name);