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

Software Engineering Mcqs

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

(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



Share this... Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Share on Whatsapp
Whatsapp

  • IF YOU THINK THAT ABOVE POSTED MCQ IS WRONG.

  • PLEASE COMMENT BELOW WITH CORRECT ANSWER AND ITS DETAIL EXPLANATION.

  • Related Mcqs


    Leave a Reply

    Your email address will not be published. Required fields are marked *