Im having trouble to find a way for formatting this:
System.out.println("Product price reported as $" + price + " before tax and $" + result + " after " + this.tax + " % tax"):
Im trying like this.
String formatDecimals = String.format("%.2f","Product price reported as $" + price + " before tax and $" + result + " after " + this.tax + " % tax"):
I want to have two decimals. Any help