+ 10
Java: Close a Scanner?
Is it necessary to close the Scanner using close() method after we use it?
3 Réponses
+ 4
https://www.sololearn.com/discuss/1439441/?ref=app
+ 3
It is not absolutely necessary to close the scanner but as mentioned above it can cause a resource leak. A dilligent coder would close the scanner to avoid resource related issues.
https://www.sololearn.com/discuss/1438010/?ref=app