Java Chapter 4 Quiz

Java Chapter 4 Quiz

University

10 Qs

quiz-placeholder

Similar activities

kuis PAB1

kuis PAB1

University

10 Qs

Современные языки программирования. Повтор по темам

Современные языки программирования. Повтор по темам

University

10 Qs

OOP evaluation

OOP evaluation

University

13 Qs

1045 week 7 (Transforming Sequences (Mutability & Memory))

1045 week 7 (Transforming Sequences (Mutability & Memory))

University

5 Qs

Java Programming

Java Programming

University

11 Qs

C/C++ Programming Chapter 3

C/C++ Programming Chapter 3

University

11 Qs

C Array

C Array

University

10 Qs

X-Quiz #5

X-Quiz #5

University

10 Qs

Java Chapter 4 Quiz

Java Chapter 4 Quiz

Assessment

Quiz

Computers

University

Medium

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?