+ 4

How do I convert strings to integers in Java?

I am working on this code, and I was wondering, how do you convert a string to integers in Java? https://code.sololearn.com/cZx3k6C0S687/#java <- Heres the link

9th Jun 2018, 12:22 PM
DengSXCreates
DengSXCreates - avatar
3 odpowiedzi
+ 8
Example: int x=Integer.parseInt("7"); https://www.sololearn.com/learn/432/?ref=app
9th Jun 2018, 1:27 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 4
oh thanks!
10th Jun 2018, 1:25 AM
DengSXCreates
DengSXCreates - avatar
0
int a = Integer.parseInt("your string");
13th Jun 2018, 11:51 AM
Debjit Mukherjee
Debjit Mukherjee - avatar