Java isEven() using modulus operator



    public static boolean isEven(int x)

    {

return (x % 2) == 0;

    }

No comments:

Post a Comment