how to clear terminal in java
public class ClearConsoleScreen { public static void main(String[] args){ System.out.print("Everything on the console will cleared"); System.out.print("\033[H\033[2J"); System.out.flush(); } }
Source: www.delftstack.com