Multiple choice technology programming languages

What will be printed on standard output if the following class is executed using the command "java Test 1 two 3" ? public class Test { static public void main(String[] args) { try { int k = Integer.parseInt(args[1]); System.out.println(args[k]); } catch (Exception e) { System.out.println(e); } } }

  1. 1

  2. two

  3. NumberFormatException

  4. ArrayIndexOutOfBoundsException

  5. Code does not compile

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

args[1] is two, parsing it gives k=2, then args[2] is 3. But Integer.parseInt(args[1]) tries to parse two as an integer, which throws NumberFormatException before any array access happens.