When i run the code which shown in below, the output is [50, 20, 5, 40, 10, 30]. I didn't understand this order. Why the output is not [10, 5, 20, 30, 40, 50] ?
List list = Arrays.asList(10, 5, 10, 20, 30, 40, 50);
System.out.println(new HashSet(list));