Ternary operator

int a = 10;
int b = 20;
int max = (a > b) ? a : b;
// Outputs: 20
System.out.println(max);
Comments