You must parse of String to Integer value. The Integer class, in
java.lang has a static method that does this conversion.
Integer.toString, whit a one parameter, a string, or two parameter,
String and radix of this number representation by that string.

String strnumber = "25";
int n = Integer.parseInt(strnumber);

String binarynumber = "10001010";
int m = Integer.parseInt(binarynumber, 2);

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to