| Developer's Daily | Java Q&A Center |
| main | java | perl | unix | dev directory | web log |
| Question: | How do I convert a String to an int with Java? |
| Answer: |
|
The Integer class includes a method named parseInt() that serves just this purpose. An example of a simple program that performs this conversion is shown below:
Other notes
|
Copyright
© 1998-2002 DevDaily Interactive, Inc.
All Rights Reserved.