DecimalFormat.setParseBigDecimal(boolean newValue) has the following syntax.
public void setParseBigDecimal(boolean newValue)
In the following code shows how to use DecimalFormat.setParseBigDecimal(boolean newValue) method.
import java.text.DecimalFormat; // www .j a v a 2 s . c o m public class Main { public static void main(String[] argv) throws Exception { DecimalFormat format = new DecimalFormat(); format.setParseBigDecimal(true); System.out.println(format.format(12345678912345678L)); } }
The code above generates the following result.