Bug in one of the questions of the assessment for Packages, Access Modifiers and Exception Handling | Selenium Forum
V
vijayparol Posted on 28/05/2021

The question was-

What is the output of the following code?

public class Temp {

public static void main(String[] args) {

try
{
int arr[] = {1,2,3,4,5};
System.out.print(arr[2]);
}
finally {
System.out.print(" 1 ");
}

System.out.print("2");

}

}

 

Answer is 3 1 2

but

when i submit the right answer, it interpreted as a wrong answer and misdirects towards the wrong option(D)


A
Ashish Replied on 01/06/2021

Ok... We are checking