Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

integer to string???

Status
Not open for further replies.

qb828

Programmer
Sep 27, 2000
98
US
hi!
i have integer array and i want to change to string.
this is not working.
int array[3]=23;

String newstringArray=array[3].toString();

is n't that correct?
if it is correct , my computer doesn't think so.

help me to change to string.

thanks.

Q
 
Dear Q,

try using this:

String newstringArray=String.valueOf(array[3]);

Eventhough arrays are objects I don't think they have a toString() method for Arrays as other objects. toString() is a method that is usually overridden by the programmer for objects.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top