J

Jatin Dubey • 3.78K Points
Extraordinary

Q. If you are inserting any value in the wrong index as shown below,

1. int a[]=new int[5];
2. a[10]=50;

it would result in ______.

  • (A) NullPointerException
  • (B) ArrayIndexOutOfBoundsException
  • (C) ArithmeticException
  • (D) NumberFormatException
  • Correct Answer - Option(B)
  • Views: 109
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics