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