Thread: Class help
View Single Post
  #8 (permalink)  
Old 11-14-2007, 07:02 AM
Shaolin Shaolin is offline
Member
 
Join Date: Nov 2007
Posts: 36
Shaolin is on a distinguished road
Thanks, I don't fully understand what you meant by your last post.

I have another question, I want to use a boolean, here is my function:

Code:
public boolean isOpen(boolean i) { if(i == false) { return false; /*Not Open*/ } else { return true; /*Is Open*/ } }
My question is, on the declaration line, do I need to declare a bool between the brackets ?

public boolean isOpen(boolean i)

-OR-

public boolean isOpen()

Which one is correct ? Or the better practise ?
Reply With Quote