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