Original Post
a simple java question but i cant seem to figure it out.
how do i do this
how do i concat an object to a string?
Iterator it = myIntegerList.iterator();//could be ArrayList ?
StringBuffer integerString = new StringBuffer();
while(it.hasNext())
{
Integer tmpInt = (Integer)it.next();//this line is to make it a little clean
integerString.append(tmpInt.toString());
integerString.append(" ");//add a space
}
System.out.println(integerString.toString());
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more