the hasNext method in Scanner doesn't actually move the Scanner to read the next line. You have to manually do it.
while(file_scan.hasNext())
{
file_scan.nextLine();
lines++;
}
Type: Posts; User: helloworld922
the hasNext method in Scanner doesn't actually move the Scanner to read the next line. You have to manually do it.
while(file_scan.hasNext())
{
file_scan.nextLine();
lines++;
}