ChoiceFormat class can be used to get smallest possible Double value.
Output:Code:double d = 1.2;
double d1 = ChoiceFormat.previousDouble(d);
double d2 = ChoiceFormat.nextDouble(d);
System.out.println(d1);
System.out.println(d2);
Code:1.1999999999999997
1.2000000000000002
