Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For a boolean variable, the name should usually be a predicate, or a statement that may be true or false. It's a good practice to include a verb in your variable name which suggests the state or condition the boolean is representing. Here are some suggestions, depending on the usage:
- isConnected
- hasItems
- canSave
- shouldDisplay
- Remember, choosing a good and meaningful name for variables is very important as it makes your code easier to understand and maintain.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement