MCQ Single Best Answer Not Set

QThe following program:
public class Test{ 
        static boolean isOK;
        public static void main(String args[]){
                System.out.print(isOK);
        } 
}

ID: #2017 Java Data Types and Variables - MCQ 1,213 views
Question Info
#2017Q ID
Not SetDifficulty
Java Data Types and Variables - MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Prints true
  • B Prints false
  • C Will not compile as boolean is not initialized
  • D Will not compile as boolean can never be static
Correct Answer: Option B

Explanation

Prints false

Share This Question

Challenge a friend or share with your study group.