Java solution using sort
public class Solution {\n    public boolean isAnagram(String s, String t) \n    {\n        char[] sChar = s.toCharArray();\n        char[] tChar = t.toCharArray
    public class Solution {\n    public boolean isAnagram(String s, String t) \n    {\n        char[] sChar = s.toCharArray();\n        char[] tChar = t.toCharArray();\n        \n        Arrays.sort(sChar);\n        Arrays.sort(tChar);\n        \n        return Arrays.equals(sChar, tChar);   \n    }\n}
[]