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?
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
13 questions
Unit 4 AP CSA Review
Quiz
•
12th Grade
10 questions
AP CSA Unit 1 & 2 Review
Quiz
•
9th - 12th Grade
12 questions
Compound Operators in Java
Quiz
•
9th - 12th Grade
13 questions
APCSA Unit 3 Review
Quiz
•
9th - 12th Grade
11 questions
Casting in Java
Quiz
•
9th - 12th Grade
12 questions
Java Strings
Quiz
•
9th - 12th Grade
10 questions
Java Coding
Quiz
•
9th - 12th Grade
10 questions
Unit 6
Quiz
•
12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University