If str1 and str2 are both String objects, which of the following expressions will correctly determine whether or not they are equal?

Java Chapter 4 Quiz

Quiz
•
Computers
•
University
•
Medium
Alex Zaldivar
Used 94+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Create a free account and access millions of resources
Similar Resources on Quizizz
11 questions
C/C++ Programming Chapter 3

Quiz
•
University
10 questions
DECISION MAKING IN C

Quiz
•
University
10 questions
P1_APLab2Quiz_B3B4

Quiz
•
University
10 questions
Программирование для инженеров

Quiz
•
University
10 questions
FOP - CHAPTER 6

Quiz
•
University
15 questions
COMPUTER ARCHITECTURE

Quiz
•
University
9 questions
Python: Strings

Quiz
•
University
13 questions
OOP evaluation

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade