
Java Fundamentals – Multiple Choice Quiz
Authored by Ganyaraj Gerthila
Computers
10th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a primitive data type in Java?
String
ArrayList
int
Scanner
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to declare a double variable with a value of 3.14159?
double piValue = "3.14159";
double piValue = 3.14159;
float piValue = "3.14159";
int piValue = 3.14159;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the key difference between System.out.print() and System.out.printf()?
print() is faster than printf()
printf() is used for formatted output
print() adds a new line after output
printf() is used for input
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement correctly increments a variable x by 1?
x += 1;
x--;
x =+ 1;
x == 1;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does a return value in a method do?
It prints a result
It exits the program
It sends a result back to the caller
It initializes an object
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is a do-while loop different from a while loop?
It uses an else block
It checks the condition before running the loop
It only runs once
It always runs at least once
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? System.out.print("Good "); System.out.println("Morning!");
Good Morning!
Good
Morning!
Good \n Morning!
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?
Similar Resources on Wayground
27 questions
Python Loops
Quiz
•
9th - 12th Grade
29 questions
JavaScript
Quiz
•
9th - 12th Grade
30 questions
Computer Tech Words
Quiz
•
9th - 12th Grade
25 questions
TDP111 - Introduction to PHP
Quiz
•
7th - 10th Grade
25 questions
JavaScript Karel Unit 1 Quiz Study Guide
Quiz
•
9th - 12th Grade
26 questions
ULANGAN HARIAN 2 MULOK - 2024
Quiz
•
10th Grade
26 questions
Basics of Pbasic
Quiz
•
10th - 12th Grade
25 questions
Python Conditional Statements
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade