CH 2 -  Java Fundamentals

CH 2 - Java Fundamentals

University

15 Qs

quiz-placeholder

Similar activities

Topic 3-2: Numerical Computation & Expression

Topic 3-2: Numerical Computation & Expression

University

12 Qs

Java Quiz 3

Java Quiz 3

University

15 Qs

Programming Java

Programming Java

University

20 Qs

Arithmetic Types Declare Initialize Relation Logical Ops

Arithmetic Types Declare Initialize Relation Logical Ops

9th Grade - University

16 Qs

Intro to Java Q1 Assessment

Intro to Java Q1 Assessment

9th Grade - University

16 Qs

Java

Java

University

15 Qs

Basic Java

Basic Java

University

15 Qs

APCS Printing and objects

APCS Printing and objects

9th Grade - University

10 Qs

CH 2 -  Java Fundamentals

CH 2 - Java Fundamentals

Assessment

Quiz

Computers

University

Easy

Created by

Alex Zaldivar

Used 47+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a valid Java comment?

/** Comment 1 */

*/ Comment 2 /*

// Comment 3

/* Comment 4 */

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When saving a Java source file, save it with an extension of

.java.

.javac.

.src.

.class.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

This is a value that is written into the code of a program.

Literal

Assignment statement

Operator

Variable

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a rule that must be followed when naming identifiers?

After the first character, you may use the letters a-z, A-Z, an underscore, a dollar sign, or digits 0-9.

Identifiers can contain spaces.

Uppercase and lowercase characters are distinct.

The first character must be one of the letters a-z, A-Z, an underscore or a dollar sign.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Character literals are enclosed in ________, and string literals are enclosed in ________.

single quotes, double quotes

double quotes, single quotes

single quotes, single quotes

double quotes, double quotes

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following expression?

17 % 3 * 2 - 12 + 15

105

12

7

8

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the value of z after the following statements have been executed?

int x = 4, y = 33;

double z;

z = (double) (y / x);

8.25

4

0

8.0

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?