I'm not sure why you need to "clear the console". I believe you may be confusing the scanner with the buffered writer class.

As far as i know you just need to close it after use with scan.close()...