if(value > conditionValue){
result = result1;
}else{
result = result2;
}
logical_expression ? expression1 : expression2
public class MainClass {
public static void main(String[] args) {
int v = 1;
System.out.println(v == 1 ? "A" : "B");
v++;
System.out.println(v == 1 ? "A" : "B");
}
}
A
B