0

Given that Arrays.sort(Object[]) throws a runtime exception if any element of the array cannot be cast to Comparable, wouldn't it be better to make the method signature Arrays.sort(Comparable[]), and turn those runtime exceptions into compilation errors?

0 Answers0