AP Computer Science A

AP Computer Science A

10th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Test- zaj. komp - klasa 4

Test- zaj. komp - klasa 4

KG - University

14 Qs

hardware and software(g3)

hardware and software(g3)

2nd - 10th Grade

10 Qs

MODULE 9 PRE-TEST

MODULE 9 PRE-TEST

10th Grade

10 Qs

MODULE 8 PRE TEST

MODULE 8 PRE TEST

10th Grade

10 Qs

Installing and Carrying Out  Variation of Application Software

Installing and Carrying Out Variation of Application Software

10th Grade

10 Qs

J277 - 1.1 Systems Architecture MCQs 2

J277 - 1.1 Systems Architecture MCQs 2

10th - 11th Grade

11 Qs

فيجوال بيسك

فيجوال بيسك

10th Grade

11 Qs

TEKNOLOGI LAYANAN JARINGAN KELAS XI PART 2

TEKNOLOGI LAYANAN JARINGAN KELAS XI PART 2

11th Grade

15 Qs

AP Computer Science A

AP Computer Science A

Assessment

Quiz

Computers

10th - 12th Grade

Hard

Created by

Thomas Martinez

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?