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