If/Else Statements
Boolean and If/Else Statement Notes & HW
Unit 3
Booleans
Logic, implementation into code, true or false logic Can be evaluated as true and false Compares data with same data types to see if they are true or not For instance, numbers are commonly used as part of this in code
If/Else Statements
Useful statements that help with control flows as methods, represents conditional programming
If Statements
If statements take a boolean parameter and if it is true, the if statement code executes otherwise nothing happens
If/Else Statements
If/Else works similar to if statements except if the if statement is false and thus not run, the else statement code runs
If/Else/If
If/Else statement that has a nested if statement as another condition. They can be nested infinitely though we use switch case statements to deal with them easier
Switch Case Statement
Executes if else logic much more quickly than if/else/if/else statements
Logic Gates
And gate Or Gate Greater than (or Equal) Gates Less than (or Equal) Gates Equal Operator Not Operator Etc.
Logic gates help process logic through comparisons. In turn, we
De Morgan's Law
Method of reversing operators and transforming a boolean statement in accordance with the not operator (reverses them)
Truth Table
Method of visualizing true and false statements in all possible combinations that returns either true or false
System.out.println(7*3+6/2-5);