import java.util.Scanner;

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

		/* primitive */

		/* identifiers:
			- can use alpha-numeric, _ , and $  
			- start with lowercase letter (convention)
			- cannot start with digit
			- camelCasing
			- use meaningful names
			- write code for maintainers
		*/

		/* type identifier = literal */

		long age = 1; 
		int width = 2;
		short height = 3;
		byte depth = 4;

		double area = 2.5;
		float volume = 3.4f;

		char middleInitial = 'x';
		boolean hasMoney = true;

		/* branching expressions (conditional) */

		if (age > 20) {
			hasMoney = true;
		}
		else {
			hasMoney = false;
		}

		/* ternary operator ?: */

		hasMoney = (age > 20) ? true : false;
		
		long quot1 = age / 2;  // integer division: both operands are integers, quot1 holds 0

		double quot2 = age / 2; // integer division, quot2 holds 0

		double quot3 = age / 2.0;  //floating point division, quot3 holds 0.5

		// age holds 1
		System.out.println(age++);  // 1 prints,  then age is incremented

		// age holds 2
		System.out.println(++age);  // increments age to 3, then prints 3

		int duration = 0;

		for (int i = duration; i < 10; i++) {
			System.out.println(i);
		}

		int j = duration;
		while(j < 10) {
			System.out.println(j);
			j++;
		}
	
		int k = duration;	
		do {
			System.out.println(k);
			k++;
		} while (k < 10);

		
		Scanner kb = new Scanner(System.in);
		System.out.print("Enter option: ");
		int option = kb.nextInt();

		switch(option) {
			default:
				System.out.println("all others");
				break;
			case 1:
				System.out.println("one");
				break;
			case 2:
				System.out.println("two");
				break;
		}



	}
}
