Answers for "how to clear the screen by pressing a key in java"

2

how to clear the screen by pressing a key in java

Runtime.getRuntime().exec("cls");
Posted by: Guest on June-23-2020
0

how to clear the screen by pressing a key in java

public static void clearScreen() {
    System.out.print("\033[H\033[2J");
    System.out.flush();
}
Posted by: Guest on February-08-2021

Code answers related to "how to clear the screen by pressing a key in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language