%s is a string in printf, and %d is a decimal I thought...yet when putting in
%s
printf
writer.printf(\"%d dollars is the balance of %s\\r\\
%d is for integers use %f instead, it works for both float and double types:
%d
%f
float
double
double d = 1.2; float f = 1.2f; System.out.printf("%f %f",d,f); // prints 1.200000 1.200000