0

In Java how to convert String Number "2" to int 2 ?

26th Feb 2017, 3:56 AM
Tapeshwar Kumar
Tapeshwar Kumar - avatar
3 Réponses
+ 3
String textNumber = "22"; int conversion = Integer.parseInt(textNumber); System.out.println(conversion); http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
26th Feb 2017, 7:17 AM
seamiki
seamiki - avatar
+ 1
Wrong Class Name. it's Integer not Intiger.. .. nice Great Job But My Question is that Without using Java Library Methods.. I want this Manually
26th Feb 2017, 4:01 AM
Tapeshwar Kumar
Tapeshwar Kumar - avatar