List is not displaying more no of records > ihave read data from 2 excel files a
ID: 3638411 • Letter: L
Question
List is not displaying more no of records > ihave read data from 2 excel files and when i run the follwing program it is showing only 1 row when there are 50 rows.Scanner s= new Scanner(fil); // reading from file
String array1[]=new String[50];
s.next(); s.next(); s.next(); s.next();
int i=0;
String[] values= new String[55];
while(s.hasNext())
{
String field=s.next();
values=field.split(",");
}
List<String> list1=new ArrayList<String>();
for(String x:values)
{
list1.add(x);
}
System.out.println(list1);