Ayuda
¿Buenas, alguien me podría explicar poque se agrega un 0 al array cuando el número es negativo en el test?
public class Solution { public int[] filterPositive(int[] numbers) {
int [] positivo = new int[5];
for (int i = 0; i < numbers.length; i++){
if(numbers[i] > 0){
positivo[i] = numbers[i];
}
}
return positivo;
}
}
Gracias