how we clear console screen in java during running the program?
Printable View
how we clear console screen in java during running the program?
class sample
{
public static void main(String args[])
{
System.out.println("Sunny");
System.out.println("Bunny");
System.out.println("Sekhar");
}
}
-------------------->After printing sunny and bunny i want to clear the screen,. so, how we clear the screen ?
Code:int enoughLines = 50; // or whatever is needed
for (int i = 0; i < enoughLines; i++) {
System.out.println();
}
@OP: you really don't believe me do you. You asked the same question here and I gave you the answer several times; what do you expect, a miracle or something?
Jos
Thanks for wasting our time original poster.
Sory for repeating the same query... but my main theme is that i want to clear my screen while iam running the program.
that's y iam repeating.... sory for inconvience..
Bye.
Reread my answer I gave in your other thread; it's the best you can do.
kind regards,
Jos
thank you sir....