DecimalFormatSymbols SetExponentSeparator() Example
Sets the string used to separate the mantissa from the exponent.
DecimalFormatSymbolsclass SetExponentSeparator() method example. This example shows you how to use SetExponentSeparator() method.This method Sets the string used to separate the mantissa from the exponent.
Here is the code:-
/**
* @Program that Sets the string used to separate the mantissa from the exponent.
* SetExponentSeparator.java
* Author:-RoseIndia Team
* Date:-14-Jun-2008
*/
import java.text.*;
public class SetExponentSeparator {
public static void main(String[] args) {
DecimalFormatSymbols dfs = new DecimalFormatSymbols();
String s=dfs.getExponentSeparator();
System.out.println("String used to separate the mantissa: "+s);
dfs.setExponentSeparator("F");
System.out.println("String used to separate the mantissa: "+dfs.getExponentSeparator());
}
} |
Output of the program:-
String used to separate the mantissa: E
String used to separate the mantissa: F |
|