As helloworld922 says, you cannot do this in pure java because java is OS independent and clearing the console is an OS function.

Whenever I wish to emulate the behavior I use this:


public...