I'm just wondering how you can get the NOR operator in Java, like this
if (!(foo == "bar" || foo1=="bar1")){ ... }
Edit: I was looking for a more efficient way to write that
[...] I was looking for a more efficient way to write
There is no NOR operator in Java. You have to do it as you did
!(A || B)
or !A && !B , of course.
!A && !B