Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 6: Array
Start Practice TestPractice Test
About Exam
hard Solved by 1 students

Array Element Increment Evaluation

Mark
< Prev
Next >

Consider the following code segment. What is printed when the code is executed?

public class Main {
    public static void main(String[] args) {
         int[] arr = {3, 6, 9};
         System.out.println(arr[0]++ + ++arr[0]);
    }
}
A

10

B

7

C

9

D

8

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|