Android examples for java.lang:Math
is Power Of Two
/*//from w w w. j a v a 2s. co m * Copyright (c) 2012-2013 OrangeSignal.com All Rights Reserved. */ //package com.java2s; public class Main { public static boolean isPowerOfTwo(final int value) { if (value != 0) { return (value & -value) == value; } return false; } }