Home » JAVA Programming » Methods » Question
  1. What is the output of this program?
    public class Result 
    {
    public static void main(String args[])
    {
    double num0 = 205;
    double num1 = 2;
    double num2 = Math.IEEEremainder(num0, num1);
    System.out.print(num2);

    }
    }
    1. 250
    2. 2
    3. 11
    4. 1.0
    5. None of these
Correct Option: D

IEEEremainder() returns the remainder of dividend / divisor. Here dividend is 205 and divisor is 2 therefore remainder is 1.0. It is similar to modulus – ‘%’ operator of C/C++ language.



Your comments will be displayed only after manual approval.