question symbol in java code example
Example: what does question mark mean in java
boolean statement ? true result : false result;
/*
For example, if we take this if statement:
*/
if (a > b) {
result = x;
} else {
result = y;
}
// can be also writen:
result = a > b ? x : y;