Computer Applications

Distinguish between the following:

hasNext() and hasNextLine()

Input in Java

30 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

20 Likes


Related Questions