public class Test {
public static void main(String[] args) {
if (args[0].equals("b") && checkFoo(args)) {
System.out.println("if evaluated to true.");
}
System.out.println("x");
}
private static boolean checkFoo(String[] args) {
System.out.println("Checking..");
return args.length > 0;
}
}
What is the result of running the above code sample with the following command "java Test a e"?
Choice 1 Checking.. X
Choice 2 if evaluated to true.
Checking..X
Choice 3 if evaluated to true. X
Choice 4 It does not compile.
Choice 5 x