| Developer's Daily | Java Q&A Center |
| main | java | perl | unix | dev directory | web log |
| Question: | How do I convert a String to a float with Java? |
| Answer: |
|
Converting a String to a float requires that you first convert the String to a Float object, then convert the Float object to a float data type (Float is an object, while float is a primitive data type). An example of a simple program that performs this conversion is shown below:
Other notes
|
Copyright
© 1998-2002 DevDaily Interactive, Inc.
All Rights Reserved.