hasNextLine

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kid Programmer
    New Member
    • Mar 2008
    • 176

    hasNextLine

    What does the hasNextLine mean. I would use it like this:
    Code:
    while ( scan.hasNextLine() ) { 
    System.out.println("The program ended gracefully");
    }
  • BigDaddyLH
    Recognized Expert Top Contributor
    • Dec 2007
    • 1216

    #2
    Originally posted by Kid Programmer
    What does the hasNextLine mean. I would use it like this:
    Code:
    while ( scan.hasNextLine() ) { 
    System.out.println("The program ended gracefully");
    }
    Y'all wanna bookmark this: http://java.sun.com/javase/6/docs/api/

    Comment

    • Kid Programmer
      New Member
      • Mar 2008
      • 176

      #3
      Originally posted by BigDaddyLH
      Y'all wanna bookmark this: http://java.sun.com/javase/6/docs/api/
      I couldn't find it in the Java API.

      Comment

      • Laharl
        Recognized Expert Contributor
        • Sep 2007
        • 849

        #4
        It's in the Scanner class I linked you to in one of your other threads.

        Comment

        • BigDaddyLH
          Recognized Expert Top Contributor
          • Dec 2007
          • 1216

          #5
          Originally posted by Kid Programmer
          I couldn't find it in the Java API.
          In general, the way to track it down is to look at the variable the method is applied to. Your code applied hasNextLine to "scan". Look for the type of scan.

          Comment

          Working...