+ 2
How to convert int into string format in java?
4 Answers
+ 3
You can simply do that :
String.valueOf(Primitive data type);
or you can convert primitive data types to string with + operator like:
3 + "2" = "32"
"world " + 2 = "world 2"
Note : if you have variable which created with a wrapper class or better i say any object you should use this code:
(This example is for an object (i) which created in Integer wrapper class)
Integer i = 6;
String.tostring(i);
output : "6"
hope useful!
+ 3
+ 3
Ali perfectly explained. I was also looking for this answer.
+ 1
Dhruv garg your welcome!