Wednesday, March 11, 2009

Java isEven() using modulus operator



    public static boolean isEven(int x)

    {

return (x % 2) == 0;

    }