How do you delete a subset of an array in Java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do you delete a subset of an array in Java

What is the best way to delete a subset of an array of elements, depending on some of the element attributes, that woukd be thread safe?

24th May 2020, 8:08 PM
ifl
ifl - avatar
1 Answer
- 1
As far i know, Arrays elements can't be deleted. Collection can, and has delete method, and clear methods..... To remove elements from collections, iterators are much helpful, threadsafe..., Edit: Hope this helps you..... https://www.baeldung.com/java-collection-remove-elements
24th May 2020, 8:17 PM
Jayakrishna 🇮🇳