Let’s examine this logically:
Given two numbers, we’ll need to decide if the first number (designated by parameter
num1), is evenly divisible by the second number (designated by parameter
num2). In the
perfectDivChecker method body, we need to write code to return
false, depending upon if this condition is satisfied.
How do we determine if one number is evenly divisible by another, mathematically speaking?: If we divide one number by the other, what must the result be? The quotient must must not be a decimal. Or, alternatively stated, the remainder of the operation must be 0 (nothing left over after division).
So what code can we write to determine if
num1, when divided by
num2, has a remainder of 0?
Once you’ve determined that logic, you can simply return the resultant boolean.
If the issue is “how do I format a Java program”, then you might try reviewing previous exercises, or this tutorial.