I can not demand an entry range when filling an array, I show you:
public static void llenar(int []sueldos, String [] nombres){
for(int i = 0; i<nombres.length; i++){
imprimir("Ingrese el nombre del empleado numero " + (i+1) + " : ");
nombres[i]=lectura.next();
imprimir("Ingrese el sueldo de " + (nombres[i]) + " : ");
sueldos[i]= lectura.nextInt();
if(sueldos[i]<100|| sueldos[i] >500){
imprimir("El empleados no esta asegurado \n");
}
imprimir("\n");
}
}
As you can see when the salary entered is less than 100 or more than 500 I show the message that the employee is not insured, but I store it in the array as well, what I would really like to do is create a repetitive structure inside the loop to prevent him from entering the salary unless it was within that range, thanks in advance.