
Java Chapter 4 Quiz
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Alex Zaldivar
Used 94+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If str1 and str2 are both String objects, which of the following expressions will correctly determine whether or not they are equal?
str1 == str2
str1 && str2
str1.equals(str2)
str1 + str2
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In an if-else statement, if the boolean expression is false
no statements or blocks are executed.
the statement or block following the else is executed.
the first statement or block is executed.
all statements or blocks are executed.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be displayed when the following code is executed?
double x = 45678.259;
DecimalFormat formatter = new DecimalFormat("#,##0.0"); JOptionPane.showMessageDialog(null,formatter.format(x));
45,678.26
45,678.3
45,678.259
45678.259
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
________ operators are used to determine whether a specific relationship exists between two values.
Assignment
Arithmetic
Logical
Relational
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The boolean expression in an if statement must evaluate to
degrees or radians
true or false
positive or negative
left or right
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following expressions determines whether the char variable chrA is not equal to the letter 'A'?
chrA == 'A'
chrA != 'A'
chrA || 'A'
chrA.notEquals('A')
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Enclosing a group of statements inside a set of braces creates
an expression
a block of statements
a relational operator
an if-else statement
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
14 questions
BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ
Quiz
•
6th Grade - University
10 questions
Semiconductores
Quiz
•
University
10 questions
UX Design
Quiz
•
University
15 questions
After Effect Intoduction
Quiz
•
10th Grade - University
12 questions
Quizz Internet
Quiz
•
KG - Professional Dev...
15 questions
Dasar Desain Grafis
Quiz
•
12th Grade - University
10 questions
Metodología XP
Quiz
•
University
10 questions
Herencia y Paquetes
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
