Podcast
Questions and Answers
What is used in Java to make decisions and is considered an abbreviated version of the if else statement?
What is used in Java to make decisions and is considered an abbreviated version of the if else statement?
- Default statement
- Conditional operator (correct)
- Break statement
- Switch statement
In Java, what symbol separates the three expressions required by the conditional operator?
In Java, what symbol separates the three expressions required by the conditional operator?
- +
- ? (correct)
- *
- -
What happens at the end of each case in a switch statement?
What happens at the end of each case in a switch statement?
- Exclamation point
- Curly braces
- Colon (correct)
- Semicolon
When a test variable does not match any case in a switch statement, what is used prior to any action that should occur?
When a test variable does not match any case in a switch statement, what is used prior to any action that should occur?
Besides if and switch statements, what is the third way mentioned in the text to make decisions in Java?
Besides if and switch statements, what is the third way mentioned in the text to make decisions in Java?
What is the result when the loop-controlling Boolean expression in a loop is false?
What is the result when the loop-controlling Boolean expression in a loop is false?
What is a loop iteration?
What is a loop iteration?
Which type of loop in Java has the loop-controlling Boolean expression as the first statement?
Which type of loop in Java has the loop-controlling Boolean expression as the first statement?
Which loop is used when you want to execute the loop body at least once before checking the loop-controlling Boolean expression?
Which loop is used when you want to execute the loop body at least once before checking the loop-controlling Boolean expression?
What type of loop is often used for concise loop execution in Java?
What type of loop is often used for concise loop execution in Java?
What is a definite loop also known as?
What is a definite loop also known as?
What type of loop is characterized by the number of iterations being determined while the program is running?
What type of loop is characterized by the number of iterations being determined while the program is running?
In a definite loop, what does the loop control variable do?
In a definite loop, what does the loop control variable do?
How do you execute more than one statement that depends on the evaluation of a Boolean expression?
How do you execute more than one statement that depends on the evaluation of a Boolean expression?
What must be included in the body of a while loop to ensure it ends?
What must be included in the body of a while loop to ensure it ends?
What happens to a variable declared within a block in Java?
What happens to a variable declared within a block in Java?
What type of loop is characterized by the loop control variable being altered by some other event?
What type of loop is characterized by the loop control variable being altered by some other event?
Which statement provides a way to test a single variable against exact values?
Which statement provides a way to test a single variable against exact values?
What is the correct syntax to start a switch
statement in Java?
What is the correct syntax to start a switch
statement in Java?
What happens if a definite while loop does not include a statement that alters the loop control variable?
What happens if a definite while loop does not include a statement that alters the loop control variable?
In Java, how can you handle multiple alternatives using conditional statements?
In Java, how can you handle multiple alternatives using conditional statements?
How does an event-controlled loop differ from a definite while loop?
How does an event-controlled loop differ from a definite while loop?
What happens if a variable is not recognized when called outside its block scope in Java?
What happens if a variable is not recognized when called outside its block scope in Java?
What is the purpose of the three sections separated by two semicolons in a for loop?
What is the purpose of the three sections separated by two semicolons in a for loop?
In a for loop, when does the body of the loop execute in relation to the control variable update?
In a for loop, when does the body of the loop execute in relation to the control variable update?
What is a characteristic of a do...while loop?
What is a characteristic of a do...while loop?
Which type of loop has the decision on whether to continue or stop at the end of its body?
Which type of loop has the decision on whether to continue or stop at the end of its body?
What does a for loop have in common with an if statement and a while loop?
What does a for loop have in common with an if statement and a while loop?
When writing a for loop or a while loop to display integers 1 through 10, what is required about the variable being used?
When writing a for loop or a while loop to display integers 1 through 10, what is required about the variable being used?
Flashcards are hidden until you start studying