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 clear screen?
Thanks!
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 clear screen?
Thanks!
The equivalent Java code would be:
Runtime.getRuntime().exec("cls");
Just a word of caution, that's going to be system dependent.
Does anyone know how to make this work in Linux. I tried
java.lang.Runtime.getRuntime().exec("pwd");
It didn't give me the supposed output.