JavaDeploy
SiteMap
Readers Writers
Java Streams
Java Programming
Java Language
Program Flow
«Prev
Java Programming
Java Technology
Useful Technology
Acquiring Java SDK
Java Compiler
Tic Tac Toe Applet
Java Applet Viewer
Java TM Interpreter
Java SDK Conclusion
OO Programming
OO Fundamentals
Understanding Classes
Object Communication
Defining Objects
Adding Behavior Methods
OO Programming Conclusion
OO Programming - Quiz
Java Programs
Java Api
Applications Applets
Java main() method
Static Class Member
Command Line Arguments
Building String Characters
Standard IO Communication
Application Construction
Program Flow
Conditional Branching
Conditional Ternary Operator
Switch Statement
For Loops
foreach Loop
Nested Loops
while Loops
doWhile Loop
Break Statement
Control Flow Conclusion
Programming Fundamentals
Identifiers, Keywords, Literals
Java Comments
Java Data Types
Storing Data Arrays
Manipulating Text
Evaluating Expressions
Numeric Operators
Boolean Assignment Operators
Compound Operators
Java Language Conclusion
Object Classes
Inheritance Fundamentals
Java Conditional Loops - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
Branches allow a Java program to:
Please select the best answer.
A.
Repeat a section of code over and over
B.
Alter the flow of execution and run one piece of code instead of another
C.
Simultaneously execute two sections of code at once
2.
How do you execute multiple lines of code based on an
if-else
statement?
Please select the best answer.
A.
Place the code below the branch.
B.
Place the code in parentheses below the branch.
C.
Place the code in a compound statement below the branch.
3.
What happens when a
switch
statement encounters a
break
statement?
Please select the best answer.
A.
The branch jumps to the next case statement.
B.
The branch is exited.
C.
The branch continues just below the break statement.
4.
The code in the default section of a
switch
statement is called:
Please select the best answer.
A.
After executing the code in a
case
match
B.
Whenever there is a
case
match
C.
Whenever there is not a
case
match
5.
The
for
loop is primarily used to:
Please select the best answer.
A.
Repeatedly execute a section of code
B.
Conditionally execute a section of code
C.
Branch to another section of code
Your score is 0.0
Submit
Quiz Explanation