Merge pull request #12427 from tudormarc/tudormarc-even-odd-negative-numbers

BAEL-5560 - small fix for negative numbers
This commit is contained in:
Loredana Crusoveanu 2022-06-30 13:26:34 +03:00 committed by GitHub
commit c534201ece
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ public class EvenOdd {
}
static boolean isOdd(int x) {
return x % 2 == 1;
return x % 2 != 0;
}
static boolean isOrEven(int x) {