logo

Crowdly

Browser

Add to Chrome

What does the following code print? public class Test {     public static void ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What does the following code print?

public class Test {

    public static void main(String[] args) {

        float f = 1.0f;

        double d = f / 0;

        System.out.println(d);

    }

}

A. Compilation Error

B. ArithmeticException

C. 0.0

D. Infinity

0%
50%
0%
50%
More questions like this

Want instant access to all verified answers on moodle.spit.ac.in?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome