I have tried to create the solution in this way but I can not find where is the mistake. Because I think it remove the odd numbers and I create a int[] to use Arrays.sort(). But it still not working, Thanks all