Consider the following code segment.
System.out.print("Java is ");
System.out.println("fun ");
System.out.print("and cool!");
What is printed as a result of executing the code segment?
Chapter1.1

Quiz
•
Computers
•
1st - 5th Grade
•
Hard
Abdelsalam Bakr
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Java is fun and cool!
Java isfun
and cool!
Java is
fun
and cool!
Java is fun
and cool!
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
System.out.println("Roses are red, ") // Line 1;
System.out.println("Violets are blue, ") // Line 2;
System.out.print("Unexpected '}' ") // Line 3;
System.out.print("on line 32. ") // Line 4;
The code segment is intended to produce the following output but may not work as intended.
Which change, if any, can be made so that the code segment produces the intended output?
Roses are red,
Violets are blue,
Unexpected '}' on line 32.
Replacing print with println on lines 3 and 4.
Replacing println with print on lines 1 and 2.
Removing the single quotes in line 3.
Putting the semicolon after the ) on each line.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type should you use to represent the average grade for a course?
int
double
boolean
String
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type should you use to represent the number of courses?
int
double
boolean
String
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type should you use to hold the first name of a person?
int
double
boolean
String
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type should you use to record if it is raining or not?
int
double
boolean
String
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type should you use to represent the amount of money you have ex 122.75?
int
double
boolean
String
Create a free account and access millions of resources
Similar Resources on Quizizz
13 questions
FontysVenlo - PRC1 - W01

Quiz
•
1st - 3rd Grade
13 questions
Питонимся

Quiz
•
1st - 5th Grade
7 questions
Vectores Java

Quiz
•
1st Grade
10 questions
Programación Java

Quiz
•
1st Grade
15 questions
SKT4 - Pemboleh ubah, pemalar & Jenis Data

Quiz
•
4th - 5th Grade
11 questions
N4 Python Programming

Quiz
•
4th Grade
15 questions
SK T5: ULANG KAJI SPM BAHAGIAN B

Quiz
•
3rd Grade
14 questions
Python-basics

Quiz
•
1st - 4th Grade
Popular Resources on Quizizz
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
Discover more resources for Computers
15 questions
Character Analysis

Quiz
•
4th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
11 questions
Decimal/fraction conversions quick check

Quiz
•
5th - 7th Grade
10 questions
Identifying equations

Quiz
•
KG - University
14 questions
IREAD-3 Practice Test

Quiz
•
3rd Grade
15 questions
Multiplication Facts

Quiz
•
4th Grade