
CH 2 - Java Fundamentals

Quiz
•
Computers
•
University
•
Easy
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
Similar Resources on Wayground
15 questions
Java Programming

Quiz
•
University
10 questions
DEBUG THE CODE

Quiz
•
University
15 questions
II CSM A & B

Quiz
•
University
15 questions
ARRAYLIST - JAVA

Quiz
•
University
18 questions
Array_to be discussF3

Quiz
•
University
10 questions
Java Static

Quiz
•
University
20 questions
Java Coding Questions

Quiz
•
University
10 questions
java operators

Quiz
•
University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University