Example 1 - Default for Boolean


This example is a simple example of using a boolean, and also shows what the default value of a boolean is.

Title Here
Copy this code into the Try It lab.

👉🏼 Try It

		//boolean play
		println("setting value = true");
		boolean value = true;
		println("value: " + value);
		println("setting value to !value (inverting)");
		value = !value;
		println("value: " + value);
		println("setting value to -- 10 > 5");
		value = 10 > 5;
		println("value : " + value);