I got an run time exception in my program while I am reading a file through a Scanner.
java.util.NoSuchElementException: No line found at java.util
You're calling nextLine() and it's throwing an exception when there's no line, exactly as the javadoc describes. It will never return null
nextLine()
null
http://download.oracle.com/javase/1,5.0/docs/api/java/util/Scanner.html