if statement using question mark java code example Example: if statement using question mark java boolean statement ? "true result" : "false result";