AP Computer Science A: <= Unit 4

AP Computer Science A: <= Unit 4

Assessment

Flashcard

Computers

10th - 12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

5 questions

Show all answers

1.

FLASHCARD QUESTION

Front

The code segment is intended to print a value that is 1 more than twice the value of n.

Back

I only

2.

FLASHCARD QUESTION

Front

What is printed as a result of executing the code segment? Options: ABCD, BCDE, BCEF, BCDEF, ABCDEF

Back

BCEF

3.

FLASHCARD QUESTION

Front

What value is returned as a result of the method call changeStr("12345") ?

Back

"53"

4.

FLASHCARD QUESTION

Front

boolean x = (5 < 8) == (5 == 8); What is the value of x?

Back

false

5.

FLASHCARD QUESTION

Front

Which of the following code segments, if located in a method in a class other than Thing, will cause the message "Hello my friend" to be printed? Options: Thing a = new Thing(); Thing.talk(); Thing.name(); Thing a = new Thing(); Thing.greet(); Thing a = new Thing(); a.talk(); Thing a = new Thing(); a.greet(); Thing a = new Thing(); a.name(); a.talk();

Back

Thing a = new Thing();
a.greet();