Java Printing Quiz

Quiz
•
Computers
•
8th Grade
•
Hard
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
Similar Resources on Wayground
10 questions
Programming in Java

Quiz
•
8th Grade
10 questions
Year 7 Python Lesson 1 Recap

Quiz
•
8th Grade
10 questions
Python Variables

Quiz
•
7th - 12th Grade
15 questions
Grade 8 End of Unit Revision

Quiz
•
8th Grade - University
11 questions
Python Code Quiz

Quiz
•
8th - 12th Grade
10 questions
computer science league

Quiz
•
6th - 12th Grade
12 questions
Mathematical Operators in Python

Quiz
•
8th Grade
15 questions
C++ While Loops

Quiz
•
6th - 8th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade
25 questions
How to Email a Teacher- https://youtu.be/NioeNhfpVfI

Quiz
•
6th - 8th Grade
20 questions
Computer Hardware

Quiz
•
6th - 8th Grade
21 questions
Gear Ratio Practice

Quiz
•
6th - 8th Grade