i++ versus ++i
Predict the outputEasyJava onlyAsked in: Infosys, PhonePe, Wipro
public class Main {
public static void main(String[] args) {
int i = 5;
int a = i++;
int b = ++i;
System.out.println(a + " " + b + " " + i);
}
}
Graded by exact match. Spaces at the ends of lines and blank lines at the end do not count.
to answer and keep your progress. Reading is free for everyone.