Error: cannot find symbol

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
A SImple Car Loan Payment Calculator

<In what way does your code behave incorrectly? Include ALL error messages.>
CarLoan.java:13: error: cannot find symbol
else if (downPayment >= carLoan){
^
symbol: variable carLoan
location: class CarLoan
CarLoan.java:18: error: cannot find symbol
int remainingBalance = carLoan - downPayment;
^
symbol: variable carLoan
location: class CarLoan
2 errors

```

public class CarLoan {
public static void main(String args) {

int carloan = 10000;
int loanLength = 3;
int interestRate = 5;
int downPayment = 2000;

if (loanLength <= 0 || interestRate <= 0){
  System.out.println("Error! You must take out a valid car loan");
}
	
else if (downPayment >= carLoan){
  System.out.println("The car can be paid in full");
} 

else {
   int remainingBalance = carLoan - downPayment;
int months = loanLength * 12;
int monthlyBalance = remainingBalance / months;
int interest = (monthlyBalance * interestRate) / 100;
int monthlyPayment =  monthlyBalance + interest;
  
 	System.out.println(monthlyPayment);
  
  } 
}

}

<do not remove the three backticks above>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.