Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
24 Cards in this Set
- Front
- Back
Structured statements that allow programmers to change the way statements in a program is executed. |
Java Control Structures |
|
Give the Types of Java Control Structures. |
> Decision Control Structures > Repetition Control Structures |
|
Allows control over specific sections of code to be executed. |
Decision Control Structures |
|
Allow repeated execution of specific sections of code. |
Repetition Control Structures |
|
A statement that specifies statements or blocks of code that will be executed if and only if a conditional statement returns are required Boolean value. |
If Structure |
|
Can execute a statement when a condition returns a required Boolean value, but will also execute a different statement if the condition does not return a required value. |
If-Else Structure |
|
Used when more than two conditional statements are involved. |
If-Else-if Structure |
|
Allows Java to "switch" between statements based on a given expression or condition. |
Switch Structure |
|
What are the differences between switch and if? |
> Multiple statements can be executed without braces. > When a case in the switch statement has been matched, statements for the matched case and succeeding statements are executed. The structure cannot be used for ranged values. |
|
Structured statements that allow programmers to repeatedly execute certain blocks of code. |
Repetition Control Structures |
|
Basic repetition control structure that repeats statements as a conditional statement is being satisfied. |
While Structure |
|
Evaluates the conditions at the beginning of the statement. |
While Structure |
|
Evaluates the conditions at the end of the structure. |
Do-While Structure |
|
Provides a compact way to iterate over a range of values used in loops. |
For Structure |
|
Statements that specifically dictate the flow of control within a program. |
Branching Statements |
|
Causes the termination of a loop or initiate an exit from a decision control structure. |
Break |
|
Exits the current method, statement or control structure and returns a value. |
Return |
|
Write the syntax of an if structure. |
|
|
Write the syntax of an if-else structure. |
|
|
Write the syntax of an if-else-if structure. |
|
|
Write the syntax of a switch structure. |
|
|
Write the syntax of a while structure. |
|
|
Write the syntax of a do-while structure. |
|
|
Write the syntax of a For Structure. |
|