Write a method called evenlyDivisible that accepts two integer parameters and returns true if the first parameter is evenly divisible by the second, or vice versa, and false otherwise. Return false if either parameter is zero.

What will be an ideal response?

```
public boolean evenlyDivisible(int num1, int num2)
{
boolean result = false;

if (num1 != 0 && num2 != 0)
if (num1 % num2 == 0 || num2 % num1 == 0)
result = true;

return result;
}

```

Computer Science & Information Technology

You might also like to view...

RAM chips have ________ to prevent improper installation

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which component manages the details of communicating with the NIC hardware to send and receive data to and from network media?

A. client B. network interface C. network protocol D. device driver

Computer Science & Information Technology