DecimalFormatSymbols GetGroupingSeparator() Example
Gets the character used for thousands separator.
DecimalFormatSymbolsclass GetGroupingSeparator() method example. This example shows you how to use GetGroupingSeparator() method.This method Gets the character used for thousands separator.
Here is the code:-
/**
* @Program that Gets the character used for thousands separator.
* GetGroupingSeparator.java
* Author:-RoseIndia Team
* Date:-14-Jun-2008
*/
import java.text.*;
public class GetGroupingSeparator {
public static void main(String[] args) {
DecimalFormatSymbols dfs = new DecimalFormatSymbols();
char c = dfs.getGroupingSeparator();
System.out.println("Character used for thousands separator: " + c);
}
} |
Output of the Program
| Character used for thousands separator: , |
|