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

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

		int x = 5;
		int y = 30;

		if(x > 0 && y > 0) {
			// do this
		}

		y = x++;

		// what value does y have?  Ans:  
		System.out.println("y: " + y);

		y = ++x;
		System.out.println("y: " + y);


		y = -5;   // unary minus
		y = -x;

		System.out.println("y: " + y);

		y = -x--;

		System.out.println("y: " + y);
		System.out.println("x: " + x);


		/* order of operations

			()
			[] 
			.

			++  post-increment
			--  post-decrement

			+ unary plus
			- unary minus
			! unary logical NOT
			++ pre-increment
			-- pre-decrement
		
			() cast
			new 

			* / %

			+ -
			+ string concatenation

			< <=
			> >=

			==  comparison equality
			!=  not equal

			&& Logical and
			
			|| logical OR

			?: ternary operator

			= += -= ...
		*/

	}
}
