DecimalFormat GetNegativeSuffix() Example
Get the negative suffix.
DecimalFormatclass GetNegativeSuffix() method example. This example shows you how to use GetNegativeSuffix() method.This method Get the negative suffix.
Here is the code:-
/**
* @Program that Get the negative suffix.
* GetNegativeSuffix.java
* Author:-RoseIndia Team
* Date:-12-Jun-2008
*/
import java.text.*;
public class GetNegativeSuffix {
public static void main(String[] args) {
// Creates a DecimalFormat object
DecimalFormat d = new DecimalFormat("0.00;0.00-");
//Get the negative suffix.
String s=d.getNegativeSuffix();
System.out.println("The negative suffix is: "+s);
}
} |
Output of the Program
| The negative suffix is: - |
|