
Java Quiz for Kids
Authored by SHWETANK SRIVASTAVA
Design
8th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
49 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this code print? System.out.print("Hello"); System.out.println(" World");
Hello World
Hello
HelloWorld
Hello World (on separate lines)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code? int x = 5; for(int i = 0; i < x; i++) { System.out.print(i + " "); }
0 1 2 3 4
1 2 3 4 5
0 1 2 3 4 5
5 4 3 2 1
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is used to read input from the user?
PrintWriter
Scanner
System.in.println
StringReader
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct way to declare a float value.
float a = 5.2;
float a = "5.2f";
float a = 5.2f;
float a = "5.2";
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of this code? int num = 3; if(num > 5) { System.out.println("Big"); } else { System.out.println("Small"); }
Big
Small
Error
Nothing
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times will this loop run? for(int i = 1; i <= 3; i++) { System.out.println("Hi"); }
1
3
2
0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used to print without a new line?
System.println
print()
System.out.print()
echo()
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 Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?