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
10 questions
APCSA - Unit 3

Quiz
•
9th - 12th Grade
10 questions
Java: repetition control structure for & while

Quiz
•
10th - 12th Grade
10 questions
Logic Building in Java Part 1

Quiz
•
6th - 9th Grade
12 questions
Java - arrays and String methods

Quiz
•
9th - 12th Grade
7 questions
Java Basics #2

Quiz
•
10th - 12th Grade
10 questions
Java Code Tracing Practice A

Quiz
•
9th - 12th Grade
11 questions
Java Boolean Statements

Quiz
•
11th Grade
9 questions
Java For Loops

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

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

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade