Guest User

Untitled

a guest
May 25th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. /**
  2. While watching @giltene's talk on java at speed found this nice piece of code to see
  3. if the number is even or not. This is a nice little code & should be used when we need to
  4. check if the number is even or not.
  5. */
  6. class CheckIfNumberIsEven {
  7. public boolean isNumberEven(int i){
  8. return (i & 0x1) == 0;
  9. }
  10. }
Add Comment
Please, Sign In to add comment