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.
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.
3 Comments
A
ReplyDeleteA
ReplyDeleteC
ReplyDelete