Sobes.tech
Junior
115
questionbank

Как можно одной строкой преобразовать ArrayList в HashSet?

AI答案

sobes.tech AI

// Создаем HashSet из ArrayList
HashSet<String> set = new HashSet<>(arrayList);