java || easy to understand
Code\n\nclass Solution {\n    public int numUniqueEmails(String[] emails) {\n        HashMap<String, Integer> map = new HashMap<>();\n        for(String email :
# Code\n```\nclass Solution {\n    public int numUniqueEmails(String[] emails) {\n        HashMap<String, Integer> map = new HashMap<>();\n        for(String email : emails){\n            String[] split = email.split("@");\n            String localName = split[0].replace(".", "");\n            String domainName = split[1];\n            int index = localName.indexOf(\'+\');\n            if(index >= 0)\n                localName = localName.substring(0, index);\n            String address = localName + \'@\' + domainName;\n            map.put(address, map.getOrDefault(address, 0) + 1);\n        }\n        return map.keySet().size();\n    }\n}\n```
['Java']