Here String.format("%0.02f", tipAmount)
you are getting
java.util.MissingFormatWidthException
//This Unchecked exception thrown when the format width is required.
Reason:
%0.02f interprets as a floating point at least 0 wide.
Thats why it gives MissingFormatWidthException // as its assuming width to 0
So use Following Instead
String.format("%.02f", tipAmount)