Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

or statement

Status
Not open for further replies.

aos

MIS
Feb 28, 2002
20
US
if(!(reportType.equalsIgnoreCase("U"))

if(!(reportType.equalsIgnoreCase("UC")))


i want to put this in one statement

so it reads;
if report type is U or report type is UC

Thanks!
 
Won't "if (reportType.equalsIgnoreCase("U")|reportType.equalsIgnoreCase("UC"))" work? Bob Rashkin
rrashkin@csc.com
 
Do you want
Or xor Xor


Code:
p  q  p or q   p xor q
T  T    T         F
T  F    T         T
F  T    T         T
F  F    F         F


Sorry, couldn't help myself... You don't want to use the
Code:
|
bitwise or do you? You want to use the boolean/Logical or: "
Code:
if(p || q)
" If indeed you want to bitwise or them together, you'd want to make it an enumeration of powers of 2, such that you can | them together, and mask for a certian number...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top