Q47
The following program: public class Test static boolean isOK; public static void main(String args[]) System.out.print(isOK);
A.
Prints true
B.
Prints false
AnswerC.
Will not compile as boolean is not initialized
D.
Will not compile as boolean can never be static
Answer: Option B
Solution
Answer: Option B
Solution:
By default, a boolean variable will contain false.