Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- While watching @giltene's talk on java at speed found this nice piece of code to see
- if the number is even or not. This is a nice little code & should be used when we need to
- check if the number is even or not.
- */
- class CheckIfNumberIsEven {
- public boolean isNumberEven(int i){
- return (i & 0x1) == 0;
- }
- }
Add Comment
Please, Sign In to add comment