how to check if a number is divisible by 2 in java code example Example: java divisible by operator boolean isDivisibleBy20 = number % 20 == 0;