What is wrong with this conversion?
public int getTheNumber(int[] factors) { ArrayList f = new ArrayList(Arrays.asList(factors)); Co
This works from Java 5 to 7:
public int getTheNumber(Integer... factors) { ArrayList f = new ArrayList(Arrays.asList(factors)); Collections.sort(f); return f.get(0)*f.get(f.size()-1); }
In Java 4 there is no vararg... :-)