Hello all -
I am currently in JAVA I, so please bare with me. We are writing really simple programs, but i guess im a good student cause i always get done first and add more crap. Question is:
Is there a way to make a JAVA program (Class:main) delete output text that we tell our program to write?
<I want to be able to make the program delete that>
I know that I can always re-print this text to make it look like it deleted the word, but thats not my style. Please help, this is killing me.
Also, I often make the program look like it is 'typing' words, like this:
yup... too much time on my hands... anyways, I know there is an easier way to do this, with a String and a For loop perhaps, but i dont know what to type... Please help with this, also... Thanks.
I don't think once you have text on the console,you can delete it unless you reprint...there may be an option where you can run a dos command to clear the console....lets see if some one else understood your question better and come up with a solution..
i wasnt planning on having the user input anything, im trying to have the program do basically all the work.... by the way i did find a loop for the 2nd question, thanks for thinkin about it anyways :-).
Khalid, I think you were closer the first time when you said about reprinting, ray ill try that clearing thing. Basically ive come up with so far is i can reprint everything ive already printed, leaving out a letter or word, making it seem like it has been deleted, but its not my style, again, i think it would look bad to be able to scroll up and the user say 'what a stupid trick'.... If you guys cant rack your minds for anything else, I understand, as my friend keeps telling me about how smart you are Khalid Ali. Thanks for the quick replies!
unless you write something that continously wait for an input, a java program will end as soon as you have printed a System.out statement.
This means you have no ability to go back and clear it...make sense..???
let me know if it does then we'll go from there...