Is there any way to convert string into integers in java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Is there any way to convert string into integers in java?

8th Nov 2019, 1:07 AM
Sanzid Sadman
Sanzid Sadman - avatar
2 Answers
+ 11
Alternatively, Integer.parseInt() can also do. Integer.parseInt("123");
8th Nov 2019, 1:26 AM
Nootnoot
Nootnoot - avatar
+ 8
int num = Integer.valueOf("1");
8th Nov 2019, 1:22 AM
Odyel
Odyel - avatar