Multiple Choice Question

Quiz Guidelines

 

QID: 
466
Question: 

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]);
      switch(x){
         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: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!