Computer Applications

Distinguish between the following:

hasNext() and hasNextLine()

Input in Java

37 Likes

Answer

hasNext()hasNextLine()
Returns true if the Scanner object has another token in its input.Returns true if there is another line in the input of the Scanner object.

Answered By

23 Likes


Related Questions