
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
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
PHP MySQL

Quiz
•
University
8 questions
Understanding Pipelining in Processors

Quiz
•
12th Grade - University
10 questions
OS(UNIT-I) QUIZ

Quiz
•
University
15 questions
Java Quiz set 3

Quiz
•
University
10 questions
Python Debugging 2

Quiz
•
University
11 questions
H446 Exam Style Question - CPU 1.1.1

Quiz
•
11th Grade - University
10 questions
Talent Next Java MCQ-1

Quiz
•
University
15 questions
CYBER 2

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University