Menu
Question Index
...

Write a program to find the given number is positive or zero.

Input (Number) Output
12.0 true
0.034 true
0.0 true
-12.0 false
null false



class PositiveNumberOrZero
{
    public static void main(String s[])
    {
        Double number = 12.45;
        System.out.println("The given number "+number+" is positive number "+isPositiveNumberOrZero(number));

    }


        public static boolean isPositiveNumberOrZero(Double number)
        {
            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