int to String

From: Peter Kirk (peter)
Date: 01/29/04


Date: 29 Jan 2004 10:21:34 +0100

Hi there,
to convert an int value to a String I could do these:

(1) String s = "" + i;
(2) String s = String.valueOf( i );
(3) String s = Integer.toString( i ); // or Integer.toString( i, 10 );

and quite possibly others which I don't know about.
But what is best practice? (Normally I would use number 2, but in most of
the code I see, number 1 is used.)

Thanks,
Peter