title: I am displaying contents of a java array in reverse order of input, but only half the array is being displayed
body: <p>I'm doing a foundations course on Java, and the task is to create a program where a user inputs 10 strings into an array, the have the program display them back to the user in the reverse order of which they were input.</p>
  
  <p>Here is the relevant code so far</p>
  
  <pre><code>String []stringarray = new String[10];
  
  public void add()
  {
      System.out.println ("Enter 10 Strings :");
      for ( int i=0; i&lt;10  ; i++ )
          stringarray[i] = Genio.getString(); 
  }
  
  public void display()
  {
      for (int i=0; i&lt;10/2; i++)
      {
          String tmp = stringarray[i];
          stringarray[i] = stringarray[10 - i - 1];
          stringarray[10 - i - 1] = tmp;
          System.out.println (stringarray[i]);
      }
  }
  </code></pre>
  
  <p>So when I input, 1 2 3 4 5 6 7 8 9 0, I should receive 0 9 8 7 6 5 4 3 2 1 back. </p>
  
  <p>However I only receive 0 9 8 7 6.  I think it might be to do with the "i&lt;10/2;" in the for line, but i'm not sure.</p>