I have a small problem which i can't seem to solve.
I want to print out my Balance in a '£100.50' format but it's currently giving me a '£100.5' format.
I'm using a decimalFormat method but it's not working. Any help why?
final DecimalFormat df2 = new DecimalFormat("#.##");
balance = 100.499999;
System.out.println("Balance: £ " + df2.format(balance));
Fixed the error by changing ("#.##") to ("#.00")