title: storing multiple user inputs into an integer array
body: <p>So here's what i'm trying to do. Have user input numbers, store them in an array, then print all those numbers out on one line. I must use a method/function as well. I think i have done quite well so far, it shows no errors in eclipse. What im stuck on is storing their input into an array. i want them to keep inputting numbers one at a time until they're satisifed and type 'quit'. i just havent read about how to store things in an array despite looking around, particularly storing more than one thing, progressively. here is my code so far, and thank you in advance for any help!</p>
  
  <pre><code>import java.util.Scanner;
  
  public class intarray {
  
  public static void main(String[] args) {
      System.out.println("Enter a number then hit enter. You may then enter another number or end by typing quit.");
      String x;
      Scanner input = new Scanner(System.in);
      while (true)  {
         x=input.next();
         if (x.equalsIgnoreCase("quit")) {break;}
         if (x.equals(null)) throw new Error("You entered nothing. Try again.");
         int stringLength = x.trim().length();
         if (stringLength == 0) throw new Error("Seems you only entered spaces. Try again.");
          isNum(x);
          int goingintoarray = Integer.parseInt(x);
  
  
  
          int array[];
  
      }
    }
  
  public static String isNum(String t) {
  
  
      int user=Integer.parseInt(t);
      String convertback = Integer.toString(user);
      return convertback;
  }
  </code></pre>
  
  <p>}</p>