title: Create a condition on a for (Array - java)
body: <p>I want to create a condition for the variable "int edad" but I'm confused...</p>
  
  <p>I need a condition to this line in particular</p>
  
  <pre><code>Integer.parseInt(JOptionPane.showInputDialog("Ingrese edad")),
  </code></pre>
  
  <p>this is a int variable and I want to verify that is between 0 and 100, then give a message to the user and ask again this variable.</p>
  
  <pre><code>package pruebas;
  
  import javax.swing.JOptionPane;
  
  public class Persona {
  
  public static void main(String[] args) {
      Estudiante [] misEstudiantes2 = new Estudiante[1];
  
      for(int i = 0; i&lt; misEstudiantes2.length; i++){
  
          misEstudiantes2[i] = new Estudiante(JOptionPane.showInputDialog("Ingrese nombre").toUpperCase(), 
             Integer.parseInt(JOptionPane.showInputDialog("Ingrese edad")),
             JOptionPane.showInputDialog("Ingrese carrera"),
             Integer.parseInt(JOptionPane.showInputDialog("Ingrese año")),
             Integer.parseInt(JOptionPane.showInputDialog("Ingrese mes")),
             Integer.parseInt(JOptionPane.showInputDialog("Ingrese dia")),
             Double.parseDouble(JOptionPane.showInputDialog("Ingrese sueldo")));
  
          misEstudiantes2[i].estableceSueldo(1);
  
          System.out.println("Objetos del array \n" + misEstudiantes2[i].dameNombre() + "\n" + misEstudiantes2[i].dameSueldo() + "\n" +
          misEstudiantes2[i].dameCarrera() + "\n" + misEstudiantes2[i].dameFecha() + "\n" + "La edad es " + misEstudiantes2[i].dameEdad());
      }
  }
  }
  </code></pre>