title: I don't get the number of input in this program if i put the number of input
body: <pre><code>import java.util.*;
  
  public class dotcom{
  
      public static void main(String Args[]){
          Scanner s = new Scanner(System.in);
          System.out.println("Input :");
          int i = s.nextInt();
          ArrayList&lt;String&gt; mylist = new ArrayList&lt;String&gt;();
  
          System.out.println(mylist.size());
  
          for(int x=1 ; x&lt;=i ; x++){    \\ if I put I=2 then it would take only 1 input instead of 2 
              String sc=s.nextLine();
              mylist.add(sc);
          }
          System.out.println(mylist.size());
      }
  }
  </code></pre>
  
  <p>pls help me </p>
  
  <p>I am trying to learn array list</p>