Oracle 1Z0-808 Exam question no. 59

Q.- Given:-

public class Test { 
        public static final int MIN = 1; 
        public static void main(String[] args) { 
                   int x = args.length; 
                   if (checklimit (x)) {    //  line n1
                          System.out.println("Java SE"); 
                   } else { 
                          System.out.println("Java EE");
                   }
                   public static boolean checklimit (int x)  {
                          return (x >= MIN) ? true : false; 
                   }
        }
}

And given the commands: 

...bin>javac Test.java 
...bin>java Test 1 

What is the result? 

A) Java EE 

B) Compilation fails at line n1. 

C) Java SE 

D) A NullPointerException is thrown at runtime. 

⧪ please give your answer in a comment section.

Post a Comment

3 Comments