To display your awnser at all times with two values displayed after the decimal point you have two output methods. Your first is as follows:
System.out.printf("%.2f", <YOUR VALUE>);
%.2F calls two decimals in a float which is first defined by printf (print float) this cannot be removed as a integer cannot be a decimal.
Yours second option is to use a decimal format. For example:
// First define your fromat as decimalFormat
DecimalFormat decimalFormat = new DecimalFormat();
// Define number of digits after the decimal point in your case two
decimalFormat.setMaximumFractionDigits(2);
// Print out our result now formated in what we have just defined
System.out.println(decimalFormat.format(<YOUR VALUE>));
Although you output a string it can take a float (you may need to put "f" after your value to make sure it is defined).
Hope this is informative.