title: Reverse numbers using java arrays
body: <p>Hello I am new to java and am trying to do this assignment but I can't get the needed output which is the reverse order of the numbers. Can any one help me what I am missing? Thank you so much! <strong>My Code's output looks like this:</strong></p>
  
  <blockquote>
    <p>How many floating point numbers do you want to type: 5 Type in 1.
    number: 5,4 Type in 2. number: 6 Type in 3. number: 7,2 Type in 4.
    number: -5 Type in 5. number: 2</p>
    
    <p>Given numbers in reverse order:</p>
    
    <p><strong>Assignment</strong></p>
  </blockquote>
  
  <p>Create a program that asks the user how many floating point numbers he wants to give. After this the program asks the numbers, stores them in an array and prints the contents of the array in reverse order.</p>
  
  <p>Program is written to a class called ReverseNumbers.
  Example output</p>
  
  <p>How many floating point numbers do you want to type: 5
  Type in 1. number: 5,4
  Type in 2. number: 6
  Type in 3. number: 7,2
  Type in 4. number: -5
  Type in 5. number: 2</p>
  
  <p>Given numbers in reverse order:
  2.0
  -5.0
  7.2
  6.0
  5.4</p>
  
  <p><strong>My code:</strong> </p>
  
  <pre><code>    import java.util.Scanner;  
  public class apples {  
      public static void main(String[] args) {  
          Scanner reader = new Scanner(System.in);  
  
          double[] numbers;  
  
          System.out.print("How many floating point numbers do you want to type: ");  
          int size = reader.nextInt();  
          numbers = new double[size];  
  
          for (int i=0; i &lt; numbers.length; i++) {  
              System.out.print("Type in "+(i+1)+". number:");  
              numbers[i-1] = reader.nextDouble();  
  
          }  
  
          System.out.println();  
          System.out.println("Given numbers in reverse order:");  
  
          for (int i=numbers.length-1; i &lt;= 0; i--) {  
  
                System.out.println( numbers[i]);  
          }  
      }  
  }  
  </code></pre>