java 数组转set


    public static void main(String[] args) {
        String[] split = {"1","1","2"};
        Set collect = Arrays.stream(split).collect(Collectors.toSet());
    }

 

 

 

 

 

你可能感兴趣的:(java,java,数组转set)