21 Feb 2009 at 23:20 #1 Energize Energize Caporegime Joined 12 Mar 2004 Posts 29,962 Location England Is there an operator in java that allows me to say the equvilent of, Code: if (this = (12 - 1) || this = (12 + 1)) Without having to use the or operator?
Is there an operator in java that allows me to say the equvilent of, Code: if (this = (12 - 1) || this = (12 + 1)) Without having to use the or operator?
21 Feb 2009 at 23:34 #2 Nimble Nimble Associate Joined 18 Nov 2008 Posts 114 if(Math.abs(this-12) == 1) would be equivalent (I'm assuming you meant == and not =).
22 Feb 2009 at 00:25 #3 Energize Energize Caporegime OP Joined 12 Mar 2004 Posts 29,962 Location England Thanks, yes I did mean ==.