|
Yes, you do need to have the boolean in the parentheses.
public boolean isOpen(boolean i)
would be the correct way to do it. The boolean inside the parentheses passes the argument (or parameter, whatever you like to call it) to the method so that the method can use that variable. Without it there, you wouldn't be able to use i in your method.
|