Question OOP-EXC-0049
MediumWhich exception does Java throw for int[] a = new int[3]; a[3] = 1;?
- A.
ArithmeticException
- B.
NullPointerException
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Exception Handling question
Which exception does Java throw for int[] a = new int[3]; a[3] = 1;?
ArithmeticException
NullPointerException
Sign up free to see the answer and a step-by-step explanation.
ClassCastException
ArrayIndexOutOfBoundsException