this is my code and it says i have problem in line 5 which i couldnt solve . can anyone please help me with this soon!
import java.text.*;
public class SavingsAccount
{
private double static annualInterestRate; //declare static variable
private double savingsBalance; //instance variable
public SavingsAccount(double bal); //constructor
{
savingsBalance= b;
}
public static double calculateMonthlyInterest() //calculates monthly interest
{
return(savingsBalance * annualInterestRate / 12);
}
static double modifyInterestRate() //declare static method
{
return annualInterestRate; //sets annualInterestRate to a new value
}
public void showBalance()
{
DecimalFormat num = new DecimalFormat(",##.00");
System.out.print("The balance is $" + num.format);
}
public static void main (String[] args)
{
SavingsAccount s1= new SavingsAccount(2000.00); //instantiate savingsAccount object 1
SavingsAccount s2= new SavingsAccount(3000.00); //instantiate savingsAccount object 2
System.out.print("\nThe balance for s1 is ");
s1.calculateMonthlyInterestRate(.04);
System.out.print("\nThe balance for s2 is ");
s2.calculateMonthlyInterestRate(.04);
s1.showBalance();
}
}