Review 3 of Beginning Java. Summary: Loops and Logic You can use if statements to change the flow of your program based on the condition of a variable. Java has Boolean AND, OR and NOT operators that allow you to test multiple conditions together. These are different than the bitwise AND, OR and NOT operators. The scope of a variable determines where a variable can be accessed from and how long it exists. Loops allow you to repeat portions of your code multiple times, and to exit the loop when certain conditions are met. Java has for loops, while loops and do-while loops.