Exam 3: Decision Structures
Exam 1: Introduction to Computers and Java42 Questions
Exam 2: Java Fundamentals53 Questions
Exam 3: Decision Structures52 Questions
Exam 4: Loops and Files48 Questions
Exam 5: Methods50 Questions
Exam 6: A First Look at Classes49 Questions
Exam 7: A First Look at Gui Applications49 Questions
Exam 8: Arrays and the Arraylist Class52 Questions
Exam 9: A Second Look at Classes and Objects40 Questions
Exam 10: Text Processing and More About Wrapper Classes49 Questions
Exam 11: Inheritance49 Questions
Exam 12: Exceptions and Advanced File Io46 Questions
Exam 13: Advanced Gui Applications46 Questions
Exam 14: Applets and More39 Questions
Exam 15: Recursion34 Questions
Exam 16: Sorting, Searching, and Algorithm Analysis46 Questions
Exam 17: Generics50 Questions
Exam 18: Collections50 Questions
Exam 19: Array-Based Lists20 Questions
Exam 20: Linked Lists36 Questions
Exam 21: Stacks and Queues36 Questions
Exam 22: Binary Trees, Avl Trees, and Priority Queues45 Questions
Select questions type
Unicode is an international encoding system that is extensive enough to represent ALL the characters of ALL the world's alphabets.
(True/False)
4.8/5
(37)
What does the following code display? double x = 12.3798146;
System.out.printf("%.2f \ n",x);
(Multiple Choice)
4.8/5
(38)
An important style rule you should follow when writing if statements is to line up the conditionally executed statement with the if statement.
(True/False)
4.7/5
(29)
What would be the value of discountRate after the following statements are executed? double discountRate;
Char custType = 'B';
Switch (custType)
{
Case 'A':
DiscountRate = .08;
Break;
Case 'B':
DiscountRate = .06;
Case 'C':
DiscountRate = .04;
Default:
DiscountRate = 0.0;
}
(Multiple Choice)
4.9/5
(32)
What is the value of x after the following code has been executed? int x = 75;
Int y = 90;
If ( x != y)
X += y;
(Multiple Choice)
4.7/5
(32)
What will be printed when the following code is executed? int y = 10;
If ( y == 10)
{
Int x = 30;
X += y;
}
System.out.print("x = ");
System.out.print(x);
(Multiple Choice)
4.7/5
(39)
Because the && operator performs short-circuit evaluation,your boolean expression will usually execute faster if the subexpression that is most likely false is on the left of the && operator.
(True/False)
4.9/5
(33)
In Java,when a character is stored in memory,it is actually stored as a(n)_____.
(Multiple Choice)
5.0/5
(30)
What would be the value of bonus after the following statements are executed? int bonus,sales = 85000;
Char dept = 'S';
If (sales > 100000)
If (dept == 'R')
Bonus = 2000;
Else
Bonus = 1500;
Else if (sales > 75000)
If (dept == 'R')
Bonus = 1250;
Else
Bonus = 1000;
Else
Bonus = 0;
(Multiple Choice)
4.8/5
(44)
Enclosing a group of statements inside a set of braces creates a
(Multiple Choice)
4.8/5
(31)
What would be the value of x after the following statements were executed? int x = 10;
Switch (x)
{
Case 10:
X += 15;
Case 12:
X -= 5;
Break;
Default:
X *= 3;
}
(Multiple Choice)
4.9/5
(33)
If str1 and str2 are both Strings,which of the following expressions will correctly determine whether they are equal? (1)(str1 == str2)
(2)str1.equals(str2)
(3)(str1.compareTo(str2)== 0)
(Multiple Choice)
4.9/5
(38)
When two Strings are compared using the compareTo method,the cases of the two strings are not considered.
(True/False)
4.9/5
(38)
What does the following code display? int d = 9,e = 12;
System.out.printf("%d %d \ n",d,e);
(Multiple Choice)
4.8/5
(32)
A local variable's scope always ends at the closing brace of the block of code in which it is declared.
(True/False)
4.8/5
(31)
These operators are used to determine whether a specific relationship exists between two values.
(Multiple Choice)
4.9/5
(31)
To do a case insensitive compare which of the following could be used to test the equality of two strings,str1 and str2?
(Multiple Choice)
4.7/5
(26)
Because the || operator performs short-circuit evaluation,your boolean expression will generally be evaluated faster if the subexpression that is most likely to be true is on the left.
(True/False)
4.9/5
(49)
Showing 21 - 40 of 52
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)