How to clear the console in Java
I want to clear the console. How can I do this?
To clear the console in java, use the given code:
public static void clearScreen() {
System.out.print("[H[2J");
System.out.flush();
}
The will help you to clear the screen.