title: trying to get my question to loop back when an invalid input is entered by user
body: <p>I feel like i almost have this right.
  the error is saying that (!isinputValid) is not initialized. trying to work out why that is and how to change it so my question repeats with invalid inputs (more than 24).</p>
  
  <pre><code>        boolean isInputValid;
  
          // The license plate must be a string and imported using next(), max 24hr parking
          for (int i = 0; i &lt; licensePlates.length; i++) {
              System.out.println("Auto" + (i + 1));
              System.out.print("      Kenteken: ");
              licensePlates[i] = input.next();
              System.out.print("      Geparkeerde uren (max. 24): ");
              parkingTime[i] = input.nextInt();
              if (parkingTime[i] &gt; 24){       // the max time for parking is 24hr
                  isInputValid = false;
                  System.out.println("      De parkeerduur kan maximaal 24 uur zijn");
              }
              while (!isInputValid);
          }
  
      }
  
  }
  </code></pre>