Java DecimalFormat .toLocalizedPattern ()

Syntax

DecimalFormat.toLocalizedPattern() has the following syntax.

public String toLocalizedPattern()

Example

In the following code shows how to use DecimalFormat.toLocalizedPattern() method.


import java.text.DecimalFormat;
//  w w  w  . ja va 2s. c  om
public class Main {
  public static void main(String[] argv) throws Exception {
    DecimalFormat format = new DecimalFormat();
    
    System.out.println(format.toLocalizedPattern());

  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.text »




DateFormat
DecimalFormat
NumberFormat
SimpleDateFormat