Easy Java Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(n+m)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(n+m)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public String[] uncommonFromSentences(String s1, String s2) {\n        String[] words1 = s1.split(" ");\n        HashMap<String,Integer>map=new HashMap<>();\n        for(String word:words1){\n            map.put(word,map.getOrDefault(word,0)+1);\n        }\n         String[] words2 = s2.split(" ");\n        for(String word:words2){\n            map.put(word,map.getOrDefault(word,0)+1);\n        }\n        ArrayList<String>list=new ArrayList<>();\n        for(Map.Entry<String,Integer>e:map.entrySet()){\n          if(e.getValue()==1){\n            list.add(e.getKey());\n          }\n        }\n        int n=list.size();\n        String res[]=new String[n];\n        for(int i=0;i<n;i++){\n            res[i]=list.get(i);\n        }\n        return res;\n    }\n}\n```
['Java']