Junior
Comment convertir un ArrayList en un HashSet en une seule ligne?
sobes.tech IA
Réponse de l'IA
// Créer un HashSet à partir d'une ArrayList
HashSet<String> set = new HashSet<>(arrayList);
sobes.tech IA
Réponse de l'IA
// Créer un HashSet à partir d'une ArrayList
HashSet<String> set = new HashSet<>(arrayList);