| Developer's Daily | Java Q&A Center |
| main | java | perl | unix | dev directory | web log |
| Question: | How do I convert a String to a long with Java? |
| Answer: |
|
The Long class includes a method named parseLong() that serves just this purpose. An example of a simple program that performs this conversion is shown below:
Other notes
Related links There is much more content related to Java and the String class on the blog, including these posts:
|
Copyright
1998-2009 Alvin Alexander, devdaily.com
All Rights Reserved.