I have run this code in compiler and getting the output as 1 but I don't understand how it will be 1. Please explain with answer.
public class Main {
public static void main(String args[]) {
int a = 10;
int b = 2;
System.out.println((a < b) ? a++ : --b);
}
}