Collections

  • 13
  • Unavailable
Collections

13
Survey/quiz
Collections,  level 13,  lesson 6
Unavailable
Collections
Collections
Comments (3)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Jimmy
Level 31 , Lausanne, Switzerland
29 May 2025, 07:31
8. What method should be used to remove an element from the middle of an ArrayList? ArrayList<String> list = new ArrayList<>(); list.add("Apple"); list.add("Banana"); list.add("Cherry"); list.add("Date"); // Remove the element at index 2 ("Cherry") list.remove(2); // Resulting list: ["Apple", "Banana", "Date"] System.out.println(list);
Harshit Garg
Level 34 , Chandigarh, India
Expert
3 November 2023, 18:24
What method should be used to remove an element from the middle of an ArrayList?
Kingpvz
Level 31 , Slovakia
30 November 2024, 08:58
neither of the answers they provided is correct