Computer Applications

Distinguish between the following:

hasNext() and hasNextLine()

Input in Java

31 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

21 Likes


Related Questions