I try to clear the console window and continue execute the rest of my code(like you navigate to another page when browse web pages)
I found Runtime.getRuntime().exec("cls");
but it doesn't work,and says can not run program cls
and I also found a suggestion like print thousand empty lines, which is not what i want. I would like to have something like
old code goes here....
showOption(); //this would display three option like 1,2,3
input=userInput.nextInt();
if(input==1){
clearWindow();/clear the previous stuff from the console
showOptionOneDetail(); //leave only option one detail on the console
}
after the user select a option, like 1, then i want to clear window, and continue display the detail for the specific option, it's that possible?
I'm testing using mac in eclipse