I am trying to open CSV file on my system and get the data line-by-line but it's not printing the top 30-40 lines.
import java.util.Scanner;
import java.io.File;
public class OpenFile
{
public static void main(String[] args) throws java.io.IOException
{
Scanner tfile = new Scanner (new File("lol.csv"));
while (tfile.hasNext())
{
String line = tfile.nextLine();
System.out.println(line);
}
}
}