Chapter1.1

Chapter1.1

1st - 5th Grade

11 Qs

quiz-placeholder

Similar activities

COE Programming

COE Programming

1st - 5th Grade

10 Qs

JAVA: Level-1

JAVA: Level-1

5th - 12th Grade

15 Qs

Introduction to Arrays

Introduction to Arrays

KG - University

10 Qs

Bab 1.4  Struktur Kawalan (SK T4)

Bab 1.4 Struktur Kawalan (SK T4)

4th Grade

12 Qs

สอบกลางภาค JAVA เรียนที่ 1/2562

สอบกลางภาค JAVA เรียนที่ 1/2562

KG - 12th Grade

15 Qs

Java March

Java March

KG - University

16 Qs

KUIZ 7 Bab 1(Pengaturcaraan)

KUIZ 7 Bab 1(Pengaturcaraan)

1st - 3rd Grade

10 Qs

Loops

Loops

5th - 12th Grade

16 Qs

Chapter1.1

Chapter1.1

Assessment

Quiz

Computers

1st - 5th Grade

Hard

Created by

Abdelsalam Bakr

FREE Resource

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Consider the following code segment.

  2. System.out.print("Java is ");

    System.out.println("fun ");

    System.out.print("and cool!");

  3. 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.

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?