Java | Easy
\nclass Solution {\n    public String[] uncommonFromSentences(String s1, String s2) {\n        String s1Array[] = s1.split(" ");\n        String s2Array[] = s2.
```\nclass Solution {\n    public String[] uncommonFromSentences(String s1, String s2) {\n        String s1Array[] = s1.split(" ");\n        String s2Array[] = s2.split(" ");\n        List<String> list = new ArrayList<>();\n        Map<String, Integer> map = new HashMap<>();\n        for(String s: s1Array) \n            map.put(s, map.getOrDefault(s, 0) + 1);\n        for(String s: s2Array) \n            map.put(s, map.getOrDefault(s, 0) + 1);\n        for (Map.Entry<String, Integer> entry : map.entrySet()) {\n            if(entry.getValue() == 1)\n                list.add(entry.getKey());\n        }\n        return list.toArray(new String[list.size()]);\n        \n    }\n}\n```
[]