else if java elseif code example Example: how to make if else statments in java if (condition) { // code block } else { // code block }