Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I seems that is helped! Thank you! But is that, if I read from a String, which has the data exactly for the number of times I mentioned .next()? Commented Mar 28, 2015 at 19:34
  • 1
    If you are using a while loop there the loop is called as long as there is a new line char at the end of the current line, you might also need to catch this exception in case the line is in invalid format Commented Mar 28, 2015 at 19:38