NumberFormat : Java Glossary


java.text.NumberFormat converts Strings to and from doubles and longs. It can deal with commas and places past the decimal. It does not understand the concept of scaled integers, e.g. storing $149.00 as 14900. Parse has the rather odd habit of sometimes returning a Long (not long) and sometimes a Double. You have to be prepared for either and convert the Long to Double or vice versa yourself. NumberFormat’s saving grace is that it adjusts to the current locale. Here is how it works:

Learning More

Oracle’s Javadoc on NumberFormat class : available:

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number