What is wrong with this conversion?
public int getTheNumber(int[] factors) {
ArrayList f = new ArrayList(Arrays.asList(factors));
Co
You are trying to cast int[] to Integer[], this is not possible.
You can use commons-lang's ArrayUtils to convert the ints to Integers before getting the List from the array:
public int getTheNumber(int[] factors) {
Integer[] integers = ArrayUtils.toObject(factors);
ArrayList f = new ArrayList(Arrays.asList(integers));
Collections.sort(f);
return f.get(0)*f.get(f.size()-1);
}