| preferred AP College board partner for AP classes
AP Computer Science A/Unit 1: Primitive Types
Start Practice TestPractice Test
About Exam
hard Solved by 3 students
Pre and Post Increment Operator Evaluation
< Prev
Next >

What is printed as a result of executing the following code segment?

public class MixedIncrement {
    public static void main(String[] args) {
        int x = 3;
        System.out.println(x++ + " " + ++x);
    }
}
A

3 4

B

4 5

C

3 5

D

Compilation Error

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1omar.nurdaulet2411 0m 00s 100
#26test6ing601 0m 00s -10
#3lsj0803092211 2m 51s -71
Items per page:
10
1 – 3 of 3
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy