DecimalFormatSymbols SetPerMill() Example
Sets the character used for per mille sign.
DecimalFormatSymbolsclass SetPerMill() method example. This example shows you how to use SetPerMill() method.This method Sets the character used for per mille sign.
Here is the code:-
/**
* @Program that Sets the character used for per mille sign.
* SetPerMill.java
* Author:-RoseIndia Team
* Date:-14-Jun-2008
*/
import java.text.*;
public class SetPerMill {
public static void main(String[] args) {
DecimalFormatSymbols dfs = new DecimalFormatSymbols();
//Gets the character used for per mille sign.
char c = dfs.getPerMill();
System.out.println("The character used for per mille sign is: " + c);
dfs.setPerMill('|');
System.out.println("The character used for per mille sign is: " +dfs.getPerMill());
}
} |
Output of the program:-
The character used for per mille sign is: ‰
The character used for per mille sign is: | |
|