Results 1 to 4 of 4
Thread: if (!weekday || vacation) ?
- 08-06-2011, 03:46 PM #1
-
- 08-06-2011, 03:51 PM #3
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
It means if weekday is not true, or vacation is true, enter the if statement.
Rather than doing
You can instead simply typeJava Code:if(booleanVariable==true)
Adding a ! To the front of the variable negates the Boolean variable, so instead of booleanVariable==false, you can type simply !booleanVariableJava Code:if(booleanVariable)
The || is the or operator. If either of the conditions is true, it evaluates to true.
- 08-06-2011, 09:11 PM #4
Similar Threads
-
3-week vacation creative project
By MGhareeb in forum New To JavaReplies: 3Last Post: 01-24-2011, 05:24 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks