Home » JAVA Programming » Methods » Question
  1. What is the output of this program?
    public class Math_Example 
    {
    public static void main(String args[])
    {
    int num0 = 10;
    int num1 = (int) Math.abs(num0);
    System.out.print(num1);
    }
    }
    1. 10.0
    2. 10
    3. 1
    4. 0
    5. None of these
Correct Option: B

10



Your comments will be displayed only after manual approval.