Public class SavingAccount {public static void main(String[] args) {public class
ID: 3863720 • Letter: P
Question
Public class SavingAccount {public static void main(String[] args) {public class SavingAccountTest public static void mint(String args[]) SavingAccount saver 1 = new SavingAccount(2000); SavingAccount saver 2 = new SavingAccount(3000); SavingAccount annualInterestRate = 0.04; System out println(Menthly balances for one year at 04); System out println(Balances:); System out println (); System out println (Base", saver 1 tostring ()saver 2 tostring()); for (int month = 1; month = 12; month++) String monthlabel - String formot (Month:, month); saver 1 calculate onthlyInterest();saver 2 calculate onthlyInterest(); System out println(, monthlabel) sever 1 tostring() sever 2 tostring()); SavingAccount modifyInterestRate(.05); saver 1 calculate onthlyInterest() saver 2 calculate onthlyInterest() System out println (nAfter setting interest rate to .05); System out printlf (Balance); System out printf)%-10s%105 saver 1 saver 2); System out printf (, sever 1 tostring() sever 2 tostring())Explanation / Answer
The coding syntax is absolutely wrong.In a Java program there can be only one instance of main function. That is why it is being used along with static keyword. In this program, there are two main functions. Change this and try to run the code again.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.