Printing in Java

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Patrick Bryar
Used 2+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
System.out.print("apple ");
System.out.print("banana ");
System.out.println("cherry ");
System.out.println("date ");
What is printed as a result of executing the code segment?
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
System.out.println("1");
System.out.print("2");
System.out.println("3");
What is printed as a result of executing the code segment?
1
23
12
3
1
2
3
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
System.out.print("Sun ");
System.out.println("Moon ");
System.out.print("Star ");
System.out.println("Sky ");
What is printed as a result of executing the code segment?
Sun
Moon Star
Sky
Sun
Moon Star
Sky
Sun Moon
Star Sky
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
System.out.println("Monday");
System.out.println("Tuesday");
System.out.print("Wednesday");
System.out.print("Thursday");
What is printed as a result of executing the code segment?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
System.out.println("Red " + "Yellow " + "Green ");
System.out.print("Blue " + "Purple ");
What is printed as a result of executing the code segment?
Red
Yellow
Green Blue Purple
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
System.out.print("Rock ");
System.out.print("Paper ");
System.out.println("Scissors ");
What is printed as a result of executing the code segment?
Rock Paper
Scissors
Rock
Paper
Scissors
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
System.out.print("1");
System.out.println("2");
System.out.print("3");
System.out.println("4");
What is printed as a result of executing the code segment?
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
System.out.println("A " + "B");
System.out.println("C");
System.out.print("D " + "E ");
What is printed as a result of executing the code segment?
A B
C
D E
A BCD E
A B
CD E
Similar Resources on Wayground
13 questions
Unit 4 AP CSA Review

Quiz
•
12th Grade
10 questions
Functions and Parameters Summative preview

Quiz
•
9th - 12th Grade
5 questions
AP Computer Science Unit 6 Arrays Pt. 3

Quiz
•
10th - 12th Grade
10 questions
Pemrograman berorientasi objek

Quiz
•
11th Grade
11 questions
Casting in Java

Quiz
•
9th - 12th Grade
13 questions
APCSA Unit 3 Review

Quiz
•
9th - 12th Grade
10 questions
Quiz 15 - Array Basics

Quiz
•
11th Grade
10 questions
STRING HANDLING

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

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

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade