Sobes.tech
Junior

Como posso converter um ArrayList em um HashSet numa única linha?

sobes.tech IA

Resposta da IA

// Criar um HashSet a partir de um ArrayList
HashSet<String> set = new HashSet<>(arrayList);