> Currently using:
>
> ArrayList alist = new ArrayList();
>
> String str = Integer.toString(location);
Integer i = new Integer(location);
alist.add(i);
> for(Iterator iter = alist.iterator(); iter.hasNext();) {
Integer i2 = (Integer)iter.next();
int a = i2.intValue();
> this is working fine, but i want to assign say the first element to int a;
> second element to int b, and so on
[quoted text clipped - 3 lines]
> System.out.println("list"+(String)(iter.next()));
> a = String;
If you really did want a String in there in the 1st place:
String s = (String)iter.next();
int a = Integer.parseInt(s);
The Docs are really quite wonderful!
--
Mike W