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).
boolean isInputValid;
// The license plate must be a string and imported using next(), max 24hr parking
for (int i = 0; i < 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] > 24){ // the max time for parking is 24hr
isInputValid = false;
System.out.println(" De parkeerduur kan maximaal 24 uur zijn");
}
while (!isInputValid);
}
}
}