APCSA Unit 1 Review 1

APCSA Unit 1 Review 1

10th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Basics in Java

Basics in Java

9th - 12th Grade

15 Qs

AP Computer Science A

AP Computer Science A

10th - 12th Grade

10 Qs

conditional constructs in Java

conditional constructs in Java

10th Grade

10 Qs

Loops

Loops

9th - 12th Grade

10 Qs

Java Quiz 1: Introduction

Java Quiz 1: Introduction

6th - 12th Grade

10 Qs

Study Guide - More Advanced Java

Study Guide - More Advanced Java

11th - 12th Grade

10 Qs

Programación con Java

Programación con Java

9th - 11th Grade

15 Qs

Quiz 15 - Array Basics

Quiz 15 - Array Basics

11th Grade

10 Qs

APCSA Unit 1 Review 1

APCSA Unit 1 Review 1

Assessment

Quiz

Computers

10th - 12th Grade

Medium

Created by

Christine Garnett

Used 83+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will this code segment output?

System.out.println("Hello");

System.out.println("World");

Hello

World

HelloWorld

Hello World

Hello


World

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which code segment will print “Hello Karel” to the screen in Java?

System.out.printLine("Hello Karel");

print "Hello Karel";

System.out.println("Hello Karel");

System.println("Hello Karel");

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

After the following code is executed, what is the value of t?


int t;

t = (int)99.999999;

99.999999

100.0

99

99.0

None of the above — an error occurs.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

After this code is executed, what is the value of x?


double x = 12;

12

12.0

24

unknown

none of these - an error occurs

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

After this code is executed, what is the value of y?


int y;

y = 2.7;

2

2.0

2.7

0

none of these - an error occurs

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following declares and initializes a variable in Java?

int x;

double z = 27;

myInt = 12;

int a = 15;

char c = 'c';

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result of this code?

final int z;

z = 20;

z = 30;

System.out.println(z);

30

20

50

nothing is printed

none of these - an error occurs

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?