Need help with if else statement in Java. Need the program to output when either l.getPlot().equals("MR")
or ("X")
and if l.getZone().equals("UP SPEC")
set the top upper limit.
Can anyone explain to me how to properly set that up so when the query is a match for MR or X it will set the top upper.
Note: If I remove || ("X")
it works for all the MR items but leaves all the ("X")
blank.
if (l.getPlot().equals("MR")) || ("X"){
if (l.getZone().equals("UP SPEC")) {
limit.setTopUpper(l.getLimit());
} else if (l.getZone().equals("LO SPEC")) {
limit.setTopLower(l.getLimit());
}
}