Originally Posted by
hemla
if (!((a + c) > b) || b % 3 == 0) {
return true;
This if-statement will return true if a + c > b is false OR b is divisible by 3 without a remainder. The only time it will not return true is if a + c > b is true and b is not divisible by 3.
Originally Posted by
hemla
if(a+ c>b && b%3==0){
return true;
This if-statement returns true if a + c > b is true AND b is divisible by 3 without a remainder. This will return false if either a + c > b is false or b % 3 == 0 is false.
In Java, as well as other OOP languages, server-side languages (i.e. PHP) and client-side languages (i.e. JavaScript), && is the logical operator AND, while || is the logical operator OR.