Limited access

Upgrade to access all content for this subject

Consider the following method.

public static void outputNumbers(int x)
{
    if (x == 1)
        System.out.print("1");
    else if (x != 2)
        System.out.print("2");
    else if (x <=3)
        System.out.print("3");
     else if (x<=4)
         System.out.print("4");
     else  
         System.out.print("5");
     System.out.print("6");
}

Which of the following is printed as a result of the call outputNumbers(1)?

A

1

B

16

C

1234

D

12346

E

123456

Select an assignment template