0

How to change the string into an integer ...

12th Feb 2021, 12:58 AM
Krishna Singh
Krishna Singh - avatar
5 Respuestas
+ 7
Specify a relevant language name in the tags ☝ This is something done in variius ways differed by language.
12th Feb 2021, 1:04 AM
Ipang
+ 5
∆BH∆Y I think you meant a = "12345" a = int(a) The OP asked for string to int, not int to string. In Java, what seems to be the only language course you're taking, you can do something like; String n = "12345"; int num = Integer.parseInt(n); // Or Integer num = Integer.valueOf(n) parseInt() will return an value with type int, where valueOf() will return an Integer object.
12th Feb 2021, 2:11 AM
ChaoticDawg
ChaoticDawg - avatar
0
It's correct
12th Feb 2021, 2:41 PM
Krishna Singh
Krishna Singh - avatar