[Java] Short & Concise Easy to Understand (Split by Semicolon)
```\nclass Solution {\n    public String entityParser(String text) {\n        int n = text.length();\n        String[] key = {"&quot", "&apos", "&amp", "&gt", "
```\nclass Solution {\n    public String entityParser(String text) {\n        int n = text.length();\n        String[] key = {"&quot", "&apos", "&amp", "&gt", "&lt", "&frasl"};\n        String[] value = {"\\"", "\'", "&", ">", "<", "/"};\n        String[] arr = text.split(";");\n        String ans = "";\n        outer : for(int i = arr.length - 1; i > -1; i--) {\n            for(int j = 0; j < 6; j++) {\n                String k = key[j];\n                if(arr[i].length() >= k.length() && arr[i].substring(arr[i].length() - k.length()).equals(k)) {\n                    ans = arr[i].substring(0, arr[i].length() - k.length()) + value[j] + ans;\n                    continue outer;\n                }\n            }\n            if(i != arr.length - 1) ans = arr[i] + ";" + ans;\n            else ans = arr[i] + ans;\n        }\n        return ans;\n    }\n}
[]