
Java check in
Authored by Rishi M
Computers
9th - 12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to declare an integer variable in Java?
A) int number = "5";
B) int number = 5;
C) integer number = 5;
D) num = 5;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a primitive data type in Java?
A) boolean
B) double
C) char
D) String
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In object-oriented programming, what is a class?
A) A value assigned to a variable
B) A blueprint for creating objects
C) A type of loop
D) A Java package
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this loop print?
for (int i = 0; i < 3; i++) {
System.out.println(i);
}
A) 1, 2, 3
B) 0, 1, 2
C) 0, 1, 2, 3
D) 1, 2
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print?
int x = 4;
int y = 3;
System.out.println(x - y * 2);
A) 2
B) -2
C) 10
D) 1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In robotics code, methods like setSpeed() or stopMotor() are examples of
A) Variables
B) Classes
C) Methods
D) Packages
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for creating a new object in Java?
A) Motor motor();
B) Motor motor = new Motor();
C) new Motor = motor();
D) create Motor motor;
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade