2) What will be the output of the following program when it is made to run with the options "java scjp5_0.chap07.Ques01 1"package scjp5_0.chap07;public class Ques01 { public static void main(String[] args) { for (int i = 0; i < 2; i ++){ try{ System.out.println(args[i]); }catch(Exception e){} } }}

  1. The program will output 'scjp5_0.chap07.Ques01 1'.

  2. The program will output 1.

  3. The program will output '1' and then will raise an ArrayIndexOutOfBoundsException.

  4. The program won't print anything but will raise an ArrayIndexOutOfBoundsException at run-time.


Correct Option: B

Find more quizzes: