import java.util.Scanner;

class Jan22 {
	public static void main(String[] args) {
	
		/*
			This is a multi-line comment
		*/

		// this is a rest-of-line comment

		Scanner kb = new Scanner(System.in);

		System.out.println("Enter name");
		
		// next() stops at any whitespace and doesn't
		// remove the whitespace from the buffer

		String name = kb.next();  
		System.out.println("name: " + name);

		// Remove the new-line character from the buffer 
		kb.nextLine();	

		System.out.println("Enter name");
	
		// Now you can read the string with nextLine()
		String name2 = kb.nextLine();

		System.out.println("name: " + name2);

		/* conditional statements 

			if ( boolean-expression) {
				// code
			}

			A boolean expression is any 
			expression that evaluates to true or false

			A conditional statement instructs the computer to
			execute a block of code *if* the boolean expression 
			is true

		*/

		int age = 21;

		if (age >= 21) {
			System.out.println("age is gt or equal to 21");
		}

		/*	Relational operators
			>= gte
			<= lte
			> strictly greater than
			< strictly less than
			== equal comparison
			!= not equal comparison
		*/

		int height = 72;
		
		if (age >= 21 && height >= 60) {
			System.out.println("age gte 21 AND height gte 60");
		}

		if (age >= 21 || height >= 60) {
			System.out.println("age gte 21 OR height gte 60");
		}
		
		if (!(age >= 21)) {
			System.out.println("it is not the case that age gte 21");
		}	

		if (age >= 21 || (age == 20 && height == 70)) {
			System.out.println("compound boolean expression");
		}

		/* Logical operators
			&& AND
			|| OR
			!  NOT
		*/

		// The modulus operator % produces the remainder

		if (age % 2 == 0) {
			System.out.println("age is even");
		}

	}
} // end of class
