How do I print out something in an IF statment?


#1



https://www.codecademy.com/courses/learn-java/projects/loan-payment-calculator


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

    int carLoan = 10000;
    int loanLength = 3;
    int intrestRate = 5;
    int downPayment = 2000;
    
    if (loanLength <= 0 || intrestRate <= 0);
    
	

	}
}


#2

Here's some basic syntax:

if(condition==true){
  System.out.println("The condition is true!");
}

#3

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