Menu
Question Index
...

What will be the output of the following program?

public class DemoOnFloats
{
    public static void main(String args[])
    {
        float first = 5.5f;
        long l = 25L, m;
        long m = l + first;
        System.out.print(m);
    }
}


30.5L
25
33
55
Compilation Error or Runtime Error

Doubts

Problems

Topic: Type Conversion In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App