DecimalFormat IsDecimalSeparatorAlwaysShown() Example
Allows you to get the behavior of the decimal separator with integers.
DecimalFormatclass IsDecimalSeparatorAlwaysShown() method example. This example shows you how to use IsDecimalSeparatorAlwaysShown() method.This method Allows you to get the behavior of the decimal separator with integers.
Here is the code:-
/**
* @Program that Allows you to get the behavior of the decimal separator with integers.
* IsDecimalSeparatorAlwaysShown.java
* Author:-RoseIndia Team
* Date:-12-Jun-2008
*/
import java.text.*;
public class IsDecimalSeparatorAlwaysShown {
public static void main(String[] args) {
// Creates a DecimalFormat object
DecimalFormat d = new DecimalFormat("365.532");
//Get the behavior of the decimal separator with integers.
System.out.println("IsDecimalSeparatorAlwaysShown is: "+d.isDecimalSeparatorAlwaysShown());
}
} |
Output of the Program
| IsDecimalSeparatorAlwaysShown is: true |
|