Is there any way to erase everything that appears in the java terminal after using some method with System.out.println ();?
Is there any way to erase everything that appears in the java terminal after using some method with System.out.println ();?
Investigating had found this function:
public static void clearScreen() {
System.out.print("3[H3[2J");
System.out.flush();
}
I hope it works for you too.