What Will Be The Output Of The Following Java Codep Pre #78
What will be the output of the following Java code?</p> <pre><code class="language-java" line="1"> class evaluate { public static void main(String args[]) { int arr[] = new int[] {0 , 1, 2, 3, 4, 5, 6, 7, 8, 9}; int n = 6; n = arr[arr[n] / 2]; System.out.println(arr[n] / 2); } }</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 Arrays - Quiz No.1.