public static void main(String[] args)
{
char [] d = {'a','b','c','d'};
char [] e = {'d','c','b','a'};
Arrays.sort(d);
Arrays.sort(e);
System.out.println(e); //console : abcd
System.out.println(d); //console : abcd
System.out.println(d.equals(e)); //console : false
}
Why are the arrays unequal? I'm probably missing something but it's driving me crazy. Isn't the result supposed to be true? And yes I have imported java.util.Arrays.