MCQ Practice Single Best Answer Topic: Java Data Types and Variables - MCQ

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

Question ID
#2017
Subchapter
Java Data Types and Variables - MCQ
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is 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: B

Explanation

Prints false

Share This Question

Share this MCQ with your friends or study group.