Exam 6: Flow of Control, Part 2: Looping
Exam 1: Introduction to Programming and the Java Language47 Questions
Exam 2: Programming Building Blocks- Java Basics57 Questions
Exam 3: Object-Oriented Programming, Part 1: Using Classes62 Questions
Exam 4: Introduction to Graphical Applications57 Questions
Exam 5: Flow of Control, Part 1: Selection68 Questions
Exam 6: Flow of Control, Part 2: Looping67 Questions
Exam 7: Object-Oriented Programming, Part 2: User-Defined Classes78 Questions
Exam 8: Single-Dimensional Arrays63 Questions
Exam 9: Multidimensional Arrays and the Arraylist Class62 Questions
Exam 10: Object-Oriented Programming, Part 3: Inheritance, Polymorphism, and Interfaces61 Questions
Exam 11: Exceptions, and Input Output Operations77 Questions
Exam 12: Graphical User Interfaces Using Java FX89 Questions
Exam 13: Recursion59 Questions
Exam 14: An Introduction to Data Structures69 Questions
Exam 15: Running Time Analysis56 Questions
Exam 16: RGB Colors, Decimal Conversion, Java Naming, and Random Number Generation110 Questions
Select questions type
The loop continuation condition is the ___________ of the loop termination condition.
Free
(Short Answer)
4.9/5
(39)
Correct Answer:
opposite
Assuming the for loop header for ( i = 0; i < 20; i++ ), what will be value of i after we exit the loop?
Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
C
In a for loop header, statements are separated with:
Free
(Multiple Choice)
4.8/5
(47)
Correct Answer:
C
When computing the maximum value among a number of values, we should initialize the maximum to 0.
(True/False)
4.8/5
(44)
Using an event-controlled while loop and an accumulation operation to create a calculator, a result that is higher than the correct total occurs because the total variable was not initialized to 0.
(True/False)
4.9/5
(38)
If you want to loop between the values 3 included and 7 excluded, the for loop header would be:
for( int count = 3; count < 7; count++ )
(True/False)
4.9/5
(32)
If the while loop condition is false the first time it is evaluated, the number of iterations that will be in the body of the loop is __________.
(Short Answer)
4.8/5
(51)
Calculating an average is a combination of addition and counting.
(True/False)
4.8/5
(35)
A sentinel value in a while loop provides a function similar to which of the following?
(Multiple Choice)
4.7/5
(35)
Writing a String in reverse can be done using a(n) __________.
(Short Answer)
5.0/5
(37)
When you use a while loop to compute the product of several values, you should initialize the variables holding the product to:
(Multiple Choice)
4.8/5
(39)
Without the priming read, the while loop continually processes the same data item, leading to an endless loop.
(True/False)
4.9/5
(44)
When you use a while loop to count how many values meet a certain condition, you should initialize the variable holding the count to:
(Multiple Choice)
4.8/5
(38)
Which of the following arguments constructs a File object with the pathname file name so that the file name is platform independent?
(Multiple Choice)
4.8/5
(34)
It is a good idea to initialize the maximum value to 0 when trying to find maximum values.
(True/False)
4.7/5
(37)
Curly braces around a for loop body are optional if the for loop body consists of only one statement.
(True/False)
4.9/5
(43)
When you use a while loop to compute the average of several integer values, and assuming there is more than one such value, what do you have to worry about when dividing the sum of these values by the number of these values?
(Essay)
4.8/5
(43)
Some code is already coded with a for loop. It is possible to rewrite that code using a while loop.
(True/False)
4.8/5
(36)
Showing 1 - 20 of 67
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)