Menu
Question Index
...

What will be the output of the following program?

public class RintMethod {
    public static void main(String[] args) {
        double x = 80.045d;
        double y = 75.460;
        double z = 79.999d;
        System.out.println(Math.rint(x) + " " + Math.rint(y) + " " + Math.rint(z));
    }
}


80.0 76.0 80.0
80.0 75.0 80.0
80 76 80
Compilation Error
Runtime 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