What is java end-of-file ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is java end-of-file ?

15th Jan 2021, 6:57 AM
Yash Chaudhari
Yash Chaudhari - avatar
2 Answers
+ 3
End of file (or EOF) means there are no more data that can be read from a data source. To check if a specific type of input is available or not you can use the hasNext() method of the Scanner class. Simple demo 👇 https://code.sololearn.com/cxDzRsPv6kF1/?ref=app
15th Jan 2021, 8:19 AM
Minho
Minho - avatar
+ 1
Please elaborate your question
15th Jan 2021, 6:59 AM
Atul [Inactive]