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