Bitwise And Hackerrank Solution For Java