CJCoding With Joseph
15per day
← Back to Question List
Java Code Walkthrough #2

Post-Increment vs Pre-Increment

mediumOperators

📄 Code

Read carefully — what does this print?
1public class Main {
2 public static void main(String[] args) {
3 int a = 5;
4 int b = a++;
5 int c = ++a;
6 System.out.println(a + " " + b + " " + c);
7 }
8}

🎯 Your Answer