I want to make the following code shortened into a loop
can anyone help me out
Thankswhile (usernumber >= 1 && usernumber <= 7) { usernumber = scanner.nextInt(); if (usernumber == vehicle[0]); { counter1 = counter1 + 1; } if (usernumber == vehicle[1]) { counter2 = counter2 + 1; } if (usernumber == vehicle[2]) { counter3 = counter3 + 1; } if (usernumber == vehicle[3]) { counter4 = counter4 + 1; } if (usernumber == vehicle[4]) { counter5 = counter5 + 1; } if (usernumber == vehicle[5]) { counter6 = counter6 + 1; } if (usernumber == vehicle[6]) { counter7 = counter7 + 1; }