Java Chapter 4 Quiz

Java Chapter 4 Quiz

University

10 Qs

quiz-placeholder

Similar activities

Quiz Informatica Jornadas Orientación Asunción

Quiz Informatica Jornadas Orientación Asunción

12th Grade - University

10 Qs

Round 2 for Preplacement Bootcamp

Round 2 for Preplacement Bootcamp

University

15 Qs

Argumentación

Argumentación

University

15 Qs

Internet

Internet

University

11 Qs

Cha-ching 2

Cha-ching 2

1st Grade - University

8 Qs

ICF-Mechanical-(Theory Quiz-2)

ICF-Mechanical-(Theory Quiz-2)

University

10 Qs

Server Administration- Quiz 1

Server Administration- Quiz 1

12th Grade - University

10 Qs

Computer Science (1-9) - Identifying & Preventing Threats

Computer Science (1-9) - Identifying & Preventing Threats

University

11 Qs

Java Chapter 4 Quiz

Java Chapter 4 Quiz

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Alex Zaldivar

Used 94+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers