Java Format - Java DecimalFormat .setMultiplier (int newValue)








Syntax

DecimalFormat.setMultiplier(int newValue) has the following syntax.

public void setMultiplier(int newValue)

Example

In the following code shows how to use DecimalFormat.setMultiplier(int newValue) method.

/*from   ww w .  j a  v  a  2 s.  com*/
import java.text.DecimalFormat;

public class Main {
  public static void main(String[] argv) throws Exception {
    DecimalFormat format = new DecimalFormat();
    format.setMultiplier(100);
    System.out.println(format.format(123456789.12345678));

  }
}

The code above generates the following result.