Menu
Question Index
...

Write a program to check whether the given number is even or not.

Input (Number) Output
2.0 true
4.0 true
7.0 false
11.0 false
null null



class EvenNumber
{
    public static void main(String s[])
    {
        Double value = 2.0;
        boolean result = isEvenNumber(value);
        System.out.println(" The given number " + value + " is even number: " + result );

    }


        public static boolean isEvenNumber(Double value)
        {
            boolean result = false;
            return result;
        }

}

Doubts

Problems

Topic: Java Double Class And Java Float Class

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App