Given:
And given the commands:
javac Test.javajava Test TRUE null
What is the result?
A.
TRUE null
B.
true false
C.
false false
D.
true true
E.
A ClassCastException is thrown at runtime.
Given:
And given the commands:
javac Test.javajava Test TRUE null
What is the result?
A.
TRUE null
B.
true false
C.
false false
D.
true true
E.
A ClassCastException is thrown at runtime.
the result is B. true false
B indeed
https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html#valueOf-java.lang.String-
public static Boolean valueOf(String s)
Returns a Boolean with a value represented by the specified string. The Boolean returned represents a true value if the string argument is not null and is equal, ignoring case, to the string “true”.
B true false