public static boolean areAnagrams(String str1, String str2){
		if(str1 == str2)
			return true;
		
		if((str1 == null && str2 != null) || (str1 != null && str2 == null))
			return false;
		
		char[] array1 = str1.toCharArray();
		char[] array2 = str2.toCharArray();
		if(array1.length != array2.length)
			return false;
		
		Arrays.sort(array1);
		Arrays.sort(array2);
		
		//return String.valueOf(array1).equals(String.valueOf(array2));
		return Arrays.equals(array1, array2);
	}