This small block of code is giving me an infinite loop. I can't understand why. The file is called "owners.dat" and it only has 10 lines. The purpose of this block of code is to count how many lines are in a file. What the heck is going on here?
Scanner countFile = new Scanner(new FileReader("owners.dat"));
while (countFile.hasNextLine())
{
size = size +1;
}
Thanks for any advice