Well, there is no method in Java to clear the screen(not what I know about)
What you can do is to use the OS commands to do this.
If you are running Linux, *BSD or something else look a like you can try this code, it will work fine.
public void cleerScreen() throws IOException
{
Process p = Runtime.getRuntime().exec("clear"
String line = "";
BufferedReader out = new BufferedReader (new InputStreamReader (p.getInputStream() ) );
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.