java && (AND) and || (OR) in IF statements code example Example: if and in java if(x == 1 && y == 2){ println("x = 1 and y = 2"); }