Reputation: 3118
I am trying to format date to be output to a file. However I want the data to be easily readable in the file itself. Each line should have a single account with the account# the persons name and their balance but the following code doesn't print each one on a separate line. Another issue I am having is that it is not outputting with only 2 decimal places even though I am using %.2f
outNewMaster.format("%d %s %s %.2f\n", acc.getAccount(), acc.getFirstName(), acc.getLastName(), acc.getBalance());
Upvotes: 0
Views: 65