What Will Be The Output Of The Following Java Programp Pre #58
What will be the output of the following Java program?</p> <pre><code class="language-java" line="1"> class variable_scope { public static void main(String args[]) { int x; x = 5; { int y = 6; System.out.print(x + " " + y); } System.out.println(x + " " + y); } }</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 Literals & Java Variables - Quiz No.1.