Thread: Class help
View Single Post
  #9 (permalink)  
Old 11-14-2007, 07:09 AM
blackstone blackstone is offline
Member
 
Join Date: Nov 2007
Posts: 6
blackstone is on a distinguished road
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.
Reply With Quote