I have two BigDecimal in my java code, and I divide the first by the second.
Example :
Double price = new Double("18.2");
Double qte = new Double("2.6");
// Convert Integer number to double value
double res = price / qte;
System.out.println(res.intValue());
The result is : "6" (for double 6.99999) Why it is not just "7" ?!
I can make :
System.out.println(new java.text.DecimalFormat("##").format(res));
To obtain 7, but it is the simplest/better solution ?