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

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

1.Prints true

2.Prints false

3.Will not compile as boolean is not initialized

4.Will not compile as boolean can never be static

Posted Date:-2021-10-25 05:10:46


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!