Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5032622

java.util.Scanner needs a hasNextLine method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 5.0
    • 5.0
    • core-libs
    • b51
    • sparc
    • solaris_9

      All the nextBlah methods have an accompanying hasNextBlah method except for nextLine, which needs a hasNextLine method so you can write a program to go through all the lines of a source without having to catch a NoSuchElementException.

      There is also a typo in nextLine that says "if no line was not found".

            mmcclosksunw Michael Mccloskey (Inactive)
            mmcclosksunw Michael Mccloskey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: