Hi, One way of doing is you can call the OS specific clear console command for example "CLS" for DOS/Windows using Runtime.exec(). but that is platform specific :-(
Java is platform independent langauge. Different Operating systems have thier own way of accesing console and clearing console. Java has no direct method for clearing console.
Using dos command like "cls" is one of the solution but it works only on windows. Similarly you need to use "clear" command for linux and so on..
Better not to use any of the above said methods lets stick conventional java
We can walk to school together. And we can both read this tiny ad:
a bit of art, as a gift, the permaculture playing cards