when I do this
double money = 2.3452;
DecimalFormat decFor = new DecimalFormat("0.00");
System.out.println(decFor.format(money));
I get this output: 2.35
But when I do this
double money = 1/8;
DecimalFormat decFor = new DecimalFormat("0.00");
System.out.println(decFor.format(money));
I get: 0.00
How to make Java to show you 0.12 instead of 0.00?