Java Format - Java DecimalFormat .getPositivePrefix ()








Syntax

DecimalFormat.getPositivePrefix() has the following syntax.

public String getPositivePrefix()

Example

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

//from w ww.  j  a v  a  2  s .  c  om
import java.text.DecimalFormat;

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

  }
}