ChoiceFormat: previousDouble(double d) : ChoiceFormat « java.text « Java by API






ChoiceFormat: previousDouble(double d)

 



import java.text.ChoiceFormat;

public class Main {
  public static void main(String[] argv) throws Exception {

    double d = 1.2;

    // Get the largest double less than d
    double d1 = ChoiceFormat.previousDouble(d);
    System.out.println(d1);
  }
}
//1.1999999999999997

   
  








Related examples in the same category

1.new ChoiceFormat(double[] limits, String[] formats)
2.ChoiceFormat: nextDouble(double d)