does java 11 need the scanner.close method code example
Example: close scanner java
Scanner scanner = new Scanner("Hello world");
//do something with scanner
scanner.close();
Scanner scanner = new Scanner("Hello world");
//do something with scanner
scanner.close();