Sobes.tech
Junior

How can you convert an ArrayList to a HashSet in one line?

sobes.tech AI

Answer from AI

// Create a HashSet from an ArrayList
HashSet<String> set = new HashSet<>(arrayList);
How can you convert an ArrayList to a HashSet in one… - sobes.tech