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?
Chapter 1
Quiz
•
Instructional Technology
•
1st - 5th Grade
•
Hard
Akshita Santra
Used 1+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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?
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.
Roses are red,
Violets are blue,
Unexpected '}' on line 32.
Which change, if any, can be made so that the code segment produces the intended output?
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 people in a household?
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?
int
double
boolean
String
20 questions
3-4.Sınıflar Blok Kodlama - 1
Quiz
•
3rd - 4th Grade
20 questions
Pré Ferias com Linguagem Orientada a Objetos
Quiz
•
3rd Grade
20 questions
Informática Word Semana 01
Quiz
•
1st - 5th Grade
20 questions
MS Word - Billentyűkombinációk
Quiz
•
5th Grade
20 questions
Conociminento de Base de datos II
Quiz
•
1st - 3rd Grade
25 questions
Estructura de Datos - Estructuras de Control C++
Quiz
•
3rd Grade
20 questions
OPTIMALISASI SAP BATCH 3
Quiz
•
1st - 10th Grade
20 questions
Tecnología tercero
Quiz
•
3rd Grade
25 questions
Equations of Circles
Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)
Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System
Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice
Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers
Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons
Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)
Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review
Quiz
•
10th Grade