What Will Be The Output Of The Following Java Programp Pre #18
What will be the output of the following Java program?</p> <pre><code class="language-java" line="1"> class mainclass { public static void main(String args[]) { boolean var1 = true; boolean var2 = false; if (var1) System.out.println(var1); else System.out.println(var2); } }</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Java Data Types Variables Arrays - Java Character and Boolean Data Types - Quiz No.1.