Casting String's | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 4

Casting String's

how do I cast a string with a value of an integer to int

1st Feb 2017, 10:43 AM
moshe slavin
moshe slavin - avatar
2 Réponses
+ 5
method 1: int a = Integer.valueOf("72") method 2: int b = Integer.parseInt("234");
1st Feb 2017, 10:47 AM
Thomas Sudeep Benardo
+ 3
thanks!!!
1st Feb 2017, 10:52 AM
moshe slavin
moshe slavin - avatar