Andrea Menjivar wrote:
Which is exactly what confuses me. But the instructions in my assignment say, " Write a method isPrime that determines if a number is prime. If the number is prime the method returns true, otherwise it returns false".
Unless I am misinterpreting that, I would love if someone could help clarify this for me?
First, I didn't dive into your code, so can't tell you that it works correctly or not ... However, it does look like you did what the assignment said. The method does take a number. And the method also returns either true or false. This is not the problem.
The problem (which the compiler is complaining about) is how you use the method that you implemented. You did not give the method a number -- you gave the method an array. You don't expect a true or false to be returned -- you expect an array to be returned.
Henry