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