Exam 3: Flow of Control
Exam 1: Getting Started46 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control43 Questions
Exam 4: Defining Classes I44 Questions
Exam 5: Defining Classes Ii46 Questions
Exam 6: Arrays47 Questions
Exam 7: Inheritance43 Questions
Exam 8: Console Input and Output43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class31 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends18 Questions
Exam 11: Recursion43 Questions
Exam 20: Applets25 Questions
Select questions type
When the number of repetitions are known in advance,you should use a ___________ statement.
Free
(Multiple Choice)
4.7/5
(33)
Correct Answer:
C
The negation operator in Java is represented by:
Free
(Multiple Choice)
5.0/5
(40)
Correct Answer:
A
Discuss the differences between the break and the continue statements when used in looping mechanisms.
Free
(Essay)
4.9/5
(43)
Correct Answer:
When the break statement is encountered within a looping mechanism,the loop immediately terminates.When the continue statement is encountered within a looping mechanism,the current iteration is terminated,and execution continues with the next iteration of the loop.
What would be the output of the code in #1 if number was originally initialized to 25?
(Short Answer)
4.8/5
(31)
The for statement,do…while statement and while statement are examples of branching mechanisms.
(True/False)
4.7/5
(38)
When choosing a sentinel value,you should choose a value that would never be encountered in the input of the program.
(True/False)
4.8/5
(34)
What is the output of the following code segment?
public static void main(String[] args)
{
int x = 5;
System.out.println("The value of x is:" + x);
while(x > 0)
{
x++;
}
System.out.println("The value of x is:" + x);
}
(Essay)
4.9/5
(33)
The equality operator (==)may be used to test if two string objects contain the same value.
(True/False)
4.9/5
(42)
A mixture of programming language and human language is known as:
(Multiple Choice)
4.7/5
(36)
Write Java code that uses a for statement to sum the numbers from 1 through 50.Display the total sum to the console.
(Essay)
4.7/5
(43)
Boolean expressions are used to control branch and loop statements.
(True/False)
4.8/5
(35)
Write Java code that uses a do…while loop that prints even numbers from 2 through 10.
(Essay)
4.9/5
(34)
The association of operands with operators is called ______________.
(Multiple Choice)
4.9/5
(31)
Not including the break statements within a switch statement results in a syntax error.
(True/False)
4.9/5
(36)
Showing 1 - 20 of 43
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)