java上有没有清屏函数啊,怎样用?
请问java上有没有清屏函数,怎样用,还有goto语句是怎样用的?谢谢
import *;
public class Test4 {
public static void main(String[] args) {
//clear the screen(for Windows System)
try
{
Runtime.getRuntime().exec("cmd /c start cls ");
}
catch (Exception e) {
System.err.println ("IOException " + e.getMessage());
}
System.out.println("Hello");
System.out.println("How are you!");
}
}
通过调用cmd命令来处理!