Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean isPowerOfTwo(int value) {
- value = Math.abs(value);
- return value % 2 == 0 && value % 2 != 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement