Given:
And given the commands:
javac Test.java
java Test
What is the result?
A. Java SE
B. Java EE
C. Compilation fails at line n1
D. A NullPointerException is thrown at runtime
Given:
And given the commands:
javac Test.java
java Test
What is the result?
A. Java SE
B. Java EE
C. Compilation fails at line n1
D. A NullPointerException is thrown at runtime
B
javac Test.java //Compiles our class Test.java
java Test //Runs our compiled class Test
Clearly, when running our class, there were 0 arguments provided.
checkLimit(int x) returns false and the output would be “Java EE”
B :
# javac Test27.java
# java Test27
Java EE
for A you need to add one or more arguments (e.g. “123” in example below) when running this program:
# java Test27 123
Java SE
B
It is B
Answer is not A, it is B
A