Been stuck for awhile on how to convert an integer to a string (the commands the books we were supplied with just throw errors =\, the command in question being "toString")
The toString() method only works on an object, so you'd have to have an Integer object, rather than an int.Anyway, if you have an int, the easiest way is with string concatenation ie. myString = "" + myInt; If you need to use objects, it's myString = new Integer(myInt).toString();
Both have the same result. To convert back to an Integer or int, use myInt = Integer.ParseInt(myString).