1. In Java, which keyword is used to declare an integer variable?
AP Computer Science-Quiz 2(G10)
Quiz
•
Computers
•
9th - 12th Grade
•
Easy
fareeda k
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1. In Java, which keyword is used to declare an integer variable?
int
double
char
boolean
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2. What is the output of the following code snippet?
int num = 10;
num = num + 5;
System.out.println(num);
5
10
15
20
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3. Primitive data types in Java include int, double, char, and boolean.
True
False
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4. Which operator is used to compare if two values are not equal in Java?
==
!=
>
<
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5. What is the correct syntax for an if statement in Java?
`if condition { }`
`if (condition) { }`
`if (condition); { }`
`if {condition} ( )`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6. Which of the following is a logical operator in Java?
&&
!=
==
>
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7. An if-else statement can be used to execute one block of code if a condition is true and another block of code if the condition is false.
True
False
15 questions
JavaScript and Graphics
Quiz
•
9th - 12th Grade
12 questions
Java G10 IT 1 - intro and conditionals
Quiz
•
10th Grade
10 questions
G12_Week7
Quiz
•
12th Grade - University
10 questions
Arrays
Quiz
•
10th - 12th Grade
10 questions
REVIEW QUIZ FOR & WHILE LOOP
Quiz
•
10th Grade
11 questions
JavaScript Control Structures Basic
Quiz
•
12th Grade
15 questions
CodeHS: Unit 6 - JavaScript Basics
Quiz
•
9th Grade
15 questions
Java Beginners
Quiz
•
11th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University