Home » JAVA Programming » Basic Operators » Question
  1. What is the output of this program?

    public class Increment
    {
    public static void main(String args[])
    {
    double num1 = 5 + 10;
    double num2 = num1 / 6;
    int num3 = 10 + 5;
    int num4 = num3 / 6;
    System.out.print(num2 + " " + num4);

    }
    }
    1. 0 2
    2. 2.5 2
    3. 2.5 1
    4. 3 2
    5. 1 1
Correct Option: B

output: 2.5 2



Your comments will be displayed only after manual approval.