title: output value of user inputs inside an array java
body: <p>I'm making a program where a user enters how many inputs the user wants. Example if the user enter's 3, then 3 user inputs will appear. The output of this program goes something like this:</p>
  
  <pre><code>    ----------------------------------
      Enter How Many Inputs: 3
  
      enter name:
      rendell //value to be outputted
  
      enter age:
      20 //value to be outputted
  
      enter gender:
      male //value to be outputted
      -----------------------------------     
  </code></pre>
  
  <p>Now, I want to store those entered values somewhere to be outputted separately after but I have no idea how to do it. I tried to use the ctr1 variable but it only outputs the value of the last user input.</p>
  
  <p>Here is my code:   </p>
  
  <pre><code>    Object stud1 [][] = {{1,2,3},{"enter name:","enter age:","enter gender:"}};
      String ctr1;
  
      BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
      Scanner scan = new Scanner(System.in);
  
  
      System.out.print("Enter How Many Inputs: ");
      int num1 = Integer.parseInt(in.readLine());
  
      for (int i = 0; i&lt;num1;i++){
           System.out.println(pers[1][i]);
           ctr1 = in.readLine();
              }
  </code></pre>