Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java clear scanner2

//There is no specific way you can clear the scanner buffer but you can try this:

Scanner scanner = new Scanner(System.in);

scanner.nextLine();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #clear
ADD COMMENT
Topic
Name
4+5 =