πŸ“Š JAVA
Q. What happens when you try to access an element at an index that is out of bounds in an ArrayList in Java?
  • (A) It returns null.
  • (B) It throws an ArrayIndexOutOfBoundsException.
  • (C) It returns -1.
  • (D) It throws an IndexOutOfBoundsException.
πŸ’¬ Discuss
βœ… Correct Answer: (B) It throws an ArrayIndexOutOfBoundsException.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
129
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ritu Nagar
Publisher
πŸ“ˆ
90%
Success Rate