title: First Element of String array printing null
body: <p>First element of string array printing null. Please explain why it is not printing the first element of string array.</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      Scanner s = new Scanner(System.in);
  
      String[] array = new String[aa];
      System.out.println("Please enter 20 names to sort");
      for (int i = 0; i &lt; array.length; i++) {
          array[i] = s.nextLine();
      }
      System.out.println(array[0]);
  
  }
  </code></pre>