Java excercises Flashcards

1
Q

What will the following code print?

  int i = 1;
  int j = i++;
  if( (i==++j) | (i++ == j) ){
    i+=j;
  }
  System.out.println(i);
A

5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly