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