+ 10

How to convert string into int and vice-versa in java??

22nd Mar 2017, 8:07 AM
Siddharth Saraf
3 Réponses
+ 17
String to int : String a = "25"; int b = Integer.parseInt(a); Int to String : String c = Integer.toString(5); or, String c = (5+""); // not a good approach though
22nd Mar 2017, 8:33 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 11
Thanks for your help my friends
24th Mar 2017, 9:19 AM
Siddharth Saraf
0
String.valueOf or integer.toString? What is the difference?
13th Apr 2017, 8:55 AM
Marcel
Marcel - avatar