Q. Which exception is thrown when array index is invalid?

  • (A) NullPointerException
  • (B) ArrayIndexOutOfBoundsException
  • (C) IOException
  • (D) ArithmeticException
πŸ’¬ Discuss
βœ… Correct Answer: (B) ArrayIndexOutOfBoundsException
Explanation: Invalid array index throws ArrayIndexOutOfBoundsException.
Explanation by: Roshan
Invalid array index throws ArrayIndexOutOfBoundsException.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
28
Total Visits
πŸ“½οΈ
4 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
84%
Success Rate