Menu
Question Index
...

What will be the output of the following program?

public class Movies {
    public static void main(String args[]) {
        float happy = 25.6f;
        float arya = 26.5f;
        Float bunny = Float.valueOf(happy);
        Float arjun = Float.valueOf(arya);
        System.out.print(bunny + ", " + arjun);
    }
}


25.6f, 26.5f
25.6, 26.5
25, 26
Compilation Error or Runtime Error

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