Menu
Question Index
...

What will be the output of the following program?

public class RechargeDenomination {
    public static void main(String[] args) {
        int procFees = 3;
        long recharge = 50;
        float serviceTax = 5.5f;
        double callingValue = 41.5;
        System.out.print(Math.min(procFees, recharge) + " ");
        System.out.print(Math.min(recharge, serviceTax) + " ");
        System.out.print(Math.min(serviceTax, callingValue) + " ");
        System.out.print(Math.min(callingValue, procFees));
    }
}


3.0 5.5 5.5 3.0
3 5.5 5.5 3.0
3 5.5 5.5 3
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