Java Quiz for Kids

Java Quiz for Kids

8th Grade

49 Qs

quiz-placeholder

Similar activities

Food Technology

Food Technology

8th Grade

50 Qs

Basic Final Quiz

Basic Final Quiz

6th - 8th Grade

50 Qs

Java Quiz for Kids

Java Quiz for Kids

Assessment

Quiz

Design

8th Grade

Practice Problem

Hard

Created by

SHWETANK SRIVASTAVA

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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()

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?