CJCoding With Joseph
15per day
← Back to Question List

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics:
Java Quiz #15

Evenly Divisible

hardMethods

What does this method return for isEvenlyDivisible(20, 7)?

📄 Code

1public static boolean isEvenlyDivisible(int num, int divisor) {
2 if (divisor == 0) {
3 return false;
4 }
5 return num % divisor == 0;
6}