And going beyond that, You will need to learn about DecimalFormat Class if in your country, the decimal separator is other than english locale... Otherwise, you will get some exceptions, for example, if you try to convert the spanish decimal separator "," to int...
http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html Regards Alex 2009/7/17 Ion Darii <[email protected]> > > That's true, you have to use "parseInt" static method, for example: > > String str = JOptionPane.showInputDialog("Please enter a int > value"); > int a = Integer.parseInt(str); > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
