1. Suppose that boodle is a double variable. Write two statements that will print boodle to System.out in the following format: $ 42,567.19 The whole dollars part of the output can contain up to nine characters (including the comma), so this example has three spaces before the six characters of 42,567. The fractional part has just two digits. Appendix B describes the format string that you’ll need in order to have the number include a comma separator between the thousands and hundreds.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here