Can any body please tell me what code is used for clear screen in Java? For example in C++
system(\"CLS\");
What code is used in Java for
You can use following code to clear command line console:
public static void clearScreen() { System.out.print("\033[H\033[2J"); System.out.flush(); }
For further references visit: http://techno-terminal.blogspot.in/2014/12/clear-command-line-console-and-bold.html