
MCQs on Java for Grade 8
Quiz
•
Design
•
8th Grade
•
Medium
SHWETANK SRIVASTAVA
Used 12+ times
FREE Resource
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used to print output in Java?
print()
println()
printf()
All of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does System.out.println("Hello"); do?
Prints Hello and stays on same line
Prints Hello and moves to next line
Prints nothing
Gives an error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement prints text without moving to next line?
System.out.println()
System.out.print()
System.out.printf()
None of these
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of System.out.print("Hi "); System.out.print("There");?
Hi
There
Hi There
HiThere
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is NOT a valid way to display output?
System.out.print("Hello")
System.out.println("Hello")
System.print("Hello")
System.out.printf("Hello")
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is a correct way to declare an integer variable?
int x;
x int;
integer x;
var int x;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type is used to store decimal numbers?
int
float
String
char
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Design
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
20 questions
Figurative Language Review
Quiz
•
8th Grade
20 questions
Physical and Chemical Changes
Quiz
•
8th Grade
22 questions
Newton's Laws of Motion
Lesson
•
8th Grade
24 questions
3.1 Parallel lines cut by a transversal
Quiz
•
8th Grade
12 questions
Phases of Matter
Quiz
•
8th Grade