Java - Programming Language
This course covers the basics of programming in Java. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!
I'm starting a coding bootcamp
Want to learn web development in a fun and gamefied environment? Head over to simulator.dev and see what I'm working on!

If Statements (Cont)

Lesson 16
Author : Mike Dane
Last Updated : October, 2017


Code

Copyboolean isStudent = false;
boolean isSmart = false;

if(isStudent && isSmart){
     System.out.println("You are a student");
} else if(isStudent && !isSmart){
     System.out.println("You are not a smart student");
} else {
     System.out.println("You are not a student and not smart");
}

// >, <, >=, <=, !=, ==, String.equals()
if(1 > 3){
     System.out.println("number comparison was true");
}

if('a' > 'b'){
     System.out.println("character comparison was true");
}

if("dog".equals("cat")){
     System.out.println("string comparison was true");
}