String.valueof() and Integer.tostring() does these both methods performs the same task to convert from string to int? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

String.valueof() and Integer.tostring() does these both methods performs the same task to convert from string to int?

3rd Aug 2017, 7:06 PM
Ashish Shukla
Ashish Shukla - avatar
2 Answers
+ 5
I would recommend String.valueOf(), it has the ability to work with more data types.
3rd Aug 2017, 7:48 PM
Jonas Schröter
Jonas Schröter - avatar
+ 2
yes . on integer they are both the same
3rd Aug 2017, 7:16 PM
Matrix Program
Matrix Program - avatar