I created an arrayList to store String values.When i am going to fetch values from my arrayList it doesn't return me the first value of it;s 0th index.
ArrayList<String> arrayList = new ArrayList<String>();
Scanner scan= new Scanner(System.in);
int noInput=scan.nextInt();
for(int i=0; i < noInput/2; i++)
arrayList.add(scan.nextLine());
for(int i=0;i<arrayList.size();i++)
System.out.println("ArrayList:"+arrayList.get(i) + " " + i );