Java Printing Quiz

Java Printing Quiz

8th Grade

11 Qs

quiz-placeholder

Similar activities

Python basics

Python basics

6th - 8th Grade

15 Qs

JAVA: Level-1

JAVA: Level-1

5th - 12th Grade

15 Qs

MK Java for-Loop Quiz 2

MK Java for-Loop Quiz 2

8th - 12th Grade

10 Qs

CodeHS - Java Console Review

CodeHS - Java Console Review

8th - 10th Grade

12 Qs

Python Revision

Python Revision

8th Grade

15 Qs

Homework 5- Variables and selection

Homework 5- Variables and selection

8th Grade

10 Qs

Python Print Statement

Python Print Statement

6th - 10th Grade

12 Qs

Python - Printing, Variables and Syntax

Python - Printing, Variables and Syntax

8th Grade

10 Qs

Java Printing Quiz

Java Printing Quiz

Assessment

Quiz

Computers

8th Grade

Hard

Created by

Elisa Lovejoy

FREE Resource

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the proper syntax for the print method for printing in Java?

print()

println()

printf()

display()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to print variables and literals in Java?

print()

println()

printf()

display()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? int x = 5; System.out.print(x);

5

0

null

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? String name = "John"; System.out.println("Hello, " + name);

Hello, John

Hello, name

Hello, null

Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to print the value of a variable in Java?

System.out.print(variable)

System.out.print("variable")

System.out.print('variable')

System.out.print("'variable'")

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? int a = 10; int b = 20; System.out.println(a + b);

1020

30

Error

null

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? System.out.print(10 + "20");

1020

30

Error

null

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?