By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,557 Members | 1,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,557 IT Pros & Developers. It's quick & easy.

HELLO!! I need help!!

mayfjf
P: 14
Hello, everyone, I am May. Is there a solution to java's clear screen problem? Thanks... I will be waiting for your suggestions...
Jan 16 '07 #1
Share this Question
Share on Google+
2 Replies


bartonc
Expert 5K+
P: 6,596
Hello, everyone, I am May. Is there a solution to java's clear screen problem? Thanks... I will be waiting for your suggestions...
Hello, May, and welcome to TheScripts.com. I found a snippet for you, but in the future, please post you code related java questions in the Java Forum. Thank you.

I am not completly sure about this so correct me if I am wrong

Because Java is plattform independent there is no clear screen command. This due to the fact that diffrent plattforms and operating systems handles this in diffrent way.

One solution to your problem is

for (int i=0; i<NUMLINES; i++)
System.out.println();


Where NUMLINES is the number of lines your dos windows has.

/Markus>
Jan 16 '07 #2

10K+
P: 13,264
Hello, everyone, I am May. Is there a solution to java's clear screen problem? Thanks... I will be waiting for your suggestions...
It is also not a problem or bug. The console does not belong to the Java program so Java is not required to have control over it.
Jan 16 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.