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