Java. Set. Find the Difference of Two Arrays
\n\nclass Solution {\n    public List<List<Integer>> findDifference(int[] nums1, int[] nums2) {\n        Set<Integer> one = Arrays.stream(nums1).boxed().collect
\n```\nclass Solution {\n    public List<List<Integer>> findDifference(int[] nums1, int[] nums2) {\n        Set<Integer> one = Arrays.stream(nums1).boxed().collect(Collectors.toSet());\n        Set<Integer> two = Arrays.stream(nums2).boxed().collect(Collectors.toSet());\n        Set<Integer> oneCopy = new HashSet<>(one);\n        List<List<Integer>> answ = new ArrayList<>();\n        one.removeAll(two);\n        two.removeAll(oneCopy);\n\n        answ.add(new ArrayList<>(one));\n        answ.add(new ArrayList<>(two));\n        return answ;\n    }\n}\n```
['Java']