Sep 03

You can either use the static toString() method in the Integer class, or string concatenation can also be used. We’d recommend using the toString() method.

int i = 123;
String s = Integer.toString(i);

// An alternative would be to use 
// the following string concatenation

String s2 = "" + i; 

written by objects \\ tags: , ,

Leave a Reply

You must be logged in to post a comment.