🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › text › NumberFormat.html
NumberFormat (Java Platform SE 8 )
1 week ago - Java™ Platform Standard Ed. 8 ... NumberFormat is the abstract base class for all number formats. This class provides the interface for formatting and parsing numbers.
🌐
Baeldung
baeldung.com › home › java › java numbers › number formatting in java
Number Formatting in Java | Baeldung
August 9, 2024 - DecimalFormat is one of the most popular ways to format a decimal number in Java. Similar to previous examples, we’ll write a helper method: public static double withDecimalFormatLocal(double value) { DecimalFormat df = (DecimalFormat) NumberFormat.getNumberInstance(Locale.getDefault()); return new Double(df.format(value)); }
🌐
ZetCode
zetcode.com › java › numberformat
Java NumberFormat - formatting numbers and currencies in Java
July 4, 2024 - Java NumberFormat tutorial shows how to format and parse numbers and currencies in Java. We set the number of fractional digits, round numbers, and group digits.
🌐
Oracle
docs.oracle.com › javase › 7 › docs › api › java › text › NumberFormat.html
NumberFormat (Java Platform SE 7 )
Java™ Platform Standard Ed. 7 ... NumberFormat is the abstract base class for all number formats. This class provides the interface for formatting and parsing numbers.
Find elsewhere
🌐
Oracle
docs.oracle.com › en › java › javase › 11 › docs › api › java.base › java › text › NumberFormat.html
NumberFormat (Java SE 11 & JDK 11 )
January 20, 2026 - You can also control the display of numbers with such methods as setMinimumFractionDigits. If you want even more control over the format or parsing, or want to give your users more control, you can try casting the NumberFormat you get from the factory methods to a DecimalFormat.
🌐
Tabnine
tabnine.com › home page › code › java › java.text.numberformat
Java Examples & Tutorials of NumberFormat.format (java.text) | Tabnine
@Override public String toPrintableString() { NumberFormat nf = NumberFormat.getInstance(); return "triangle triplet count: " + nf.format(triangleTripletCount) + "; rectangle triplet count: " + nf.format(rectangleTripletCount) + "; maximum triangle triplets: " + nf.format(maximumTriangleTriplets) + "; maximum rectangle triplets: " + nf.format(maximumRectangleTriplets); }
🌐
Jenkov
jenkov.com › tutorials › java-internationalization › numberformat.html
Java NumberFormat
June 23, 2014 - The java.text.NumberFormat class is used to format numbers according to a specific Locale. Different countries have different standards for how they format numbers. In Denmark fractions of a number are separated from the integer part using a comma.
🌐
GeeksforGeeks
geeksforgeeks.org › java › numberformat-class-java
NumberFormat Class in Java - GeeksforGeeks
January 23, 2026 - import java.text.NumberFormat; public class GFG { public static void main(String[] args) { NumberFormat nf = NumberFormat.getInstance(); System.out.println(nf.format(1234567.89)); } }
🌐
Oracle
docs.oracle.com › en › java › javase › 17 › docs › api › java.base › java › text › NumberFormat.html
NumberFormat (Java SE 17 & JDK 17)
January 20, 2026 - You can also control the display of numbers with such methods as setMinimumFractionDigits. If you want even more control over the format or parsing, or want to give your users more control, you can try casting the NumberFormat you get from the factory methods to a DecimalFormat or CompactNumberFormat depending on the factory method used.
🌐
Classpath
developer.classpath.org › doc › java › text › NumberFormat-source.html
Source for java.text.NumberFormat (GNU Classpath 0.95 Documentation)
*/ 38: 39: 40: package java.text; 41: 42: import gnu.java.locale.LocaleHelper; 43: 44: import java.io.IOException; 45: import java.io.InvalidObjectException; 46: import java.io.ObjectInputStream; 47: import java.io.ObjectOutputStream; 48: 49: import java.text.spi.NumberFormatProvider; 50: 51: import java.util.Currency; 52: import java.util.Locale; 53: import java.util.MissingResourceException; 54: import java.util.ResourceBundle; 55: import java.util.ServiceLoader; 56: 57: /** 58: * This is the abstract superclass of all classes which format and 59: * parse numeric values such as decimal numbers, integers, currency values, 60: * and percentages.
🌐
Mpg
resources.mpi-inf.mpg.de › d5 › teaching › ss05 › is05 › javadoc › java › text › NumberFormat.html
java.text Class NumberFormat
Get the set of Locales for which NumberFormats are installed · Returns: available locales · public int hashCode() Overrides hashCode · Overrides: hashCode in class Object · Returns: a hash code value for this object. See Also: Object.equals(java.lang.Object), Hashtable ·
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › api › java.text.numberformat.format
NumberFormat.Format Method (Java.Text) | Microsoft Learn
[<Android.Runtime.Register("format", "(DLjava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_DLjava_lang_StringBuffer_Ljava_text_FieldPosition_Handler")>] override this.Format : double * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer ... keeps track on the position of the field within the returned string. For example, for formatting a number 1234567.89 in Locale.US locale, if the given fieldPosition is NumberFormat#INTEGER_FIELD, the begin index and end index of fieldPosition will be set to 0 and 9, respectively for the output string 1,234,567.89.