I know this might not be the best way of scanning for input and printing it out but I want to figure out if it's possible.
I keep getting a runtime error. what am I doing wrong?
the input is 1, 2, 3, 4, 5
and I want the computer to stop processing the input when it gets to 3 so that it prints only 1-3 to the standard output window.
any feedback would be great. thank you 

```
import java.util.Scanner;

public class numRewrite {
  public static void main(String[] args) {    
    Scanner input = new Scanner(System.in);

    int[] numInput = {};
    int numPlace;

    for(numPlace = 0;numPlace < 4;numPlace++) {
        numInput[numPlace] = input.nextInt();
    }

    while(numInput[numPlace]!= 4) {
        System.out.println(numInput[numPlace]);     
    }
  }
}

```