Skip to content

Commit

Permalink
Standard and faster idiom
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Feb 12, 2017
1 parent 93f9b07 commit 84fa342
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -84,7 +84,7 @@ static boolean isOdd(int intValue) {
}

static boolean isEven(int intValue) {
return intValue % 2 == 0;
return (intValue & 0x1) == 0;
}

}

0 comments on commit 84fa342

Please sign in to comment.