int to String
int i = 10; String s = Integer.toString( i ); System.out.println( s ); // write result to Output windowOutput:
10
long to String
long l = 456; s = Long.toString( l ); System.out.println( s ); // write result to Output windowOutput:
456
double to String
double d = 5.51; s = Double.toString( d ); System.out.println( s ); // write result to Output windowOutput:
5.51
float to String
float f = 15.55f; s = Float.toString( f ); System.out.println( s ); // write result to Output windowThe output is:
15.55
No comments:
Post a Comment