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);
sobes.tech AI
Answer from AI
// Create a HashSet from an ArrayList
HashSet<String> set = new HashSet<>(arrayList);