Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

int Array to String

802684Oct 3 2010 — edited Oct 3 2010
Hello,

Im trying to turn an int Array into a String.
For instance: if I have a an int i [] = {1,2,3}; I want the String to be 123.

I had no problem converting a char Array, but the same method wont work for an int Array. (See below)
char c [] = {'a','b','c'};
String strChar = new String(c);

//the following will give you a "cannot find symbol" error when compiling
int i [] = {1,2,3};
String strInt = new String(i);
Any simple way to circumvent this problem?

Thanks in advance for all comments/answers!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2010
Added on Oct 3 2010
8 comments
448 views