Multiple Choice Question

Quiz Guidelines



Assuming that a valid integer will be passed in the command line as first argument, which statements regarding the following code are correct?

public class TestClass{
   public static void main(String args[]){
      int x = Integer.parseInt(args[0]);
         case x < 5 :   System.out.println("BIG"); break;
         case x > 5 :   System.out.println("SMALL");
         default :    System.out.println("CORRECT"); break;

Select 1 option

A. BIG will never be followed by SMALL.
B. SMALL will never follow anything else.
C. SMALL will always be followed by CORRECT.
D. It will not compile.
E. It will throw an exception at runtime.

Q&A Set: