c.
System.out.println("Account 1 id 111111 name: john smith balance: 500 $");
System.out.println("Account 2 id 222222 name: mark smith balance: 1500 $");
System.out.println("Account 3 id 333333 name: steve jones balance: 2000 $");
System.out.println("Account 4 id 444444 name: mary jones balance: 1000 $");
If you have the variables data, you can replace each id, name and balance directly from the variables using String concatenation.
d.
int totalBalance = 500 + 1500 + 2000 + 1000;
System.out.println("Total balance of all accounts is " + totalBalance + " $");
solved Java File Handling DisplayOnConsole