Menu
Question Index
...

What will be the output of the following program?

public class ValueOfValueSubtraction
{
    public static void main(String s[])
    {
        double value = Math.round (2.5 - 3.4 + Math.random());
        System.out.println("Output is: " + value);
    }
}


Output is: -0.9
Output is: -1.0
Output is: 0.0
Output can not be predicted
Compilation Error

Doubts

Problems

Topic: Java Math Class - java.lang.Math

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App