I am building a clock and it works mostly; The issue with my code is that I cant figure out how to have one constantly changing text instead of a billion texts with only the newly created text with the correct time
could someone please tell me how to change erase and or update this so it will fix my problem pls
import java.util.Date;
import java.text.SimpleDateFormat;
public class abugnoisyclockmainclass {
public static void telltime () {
for(;;) {
Date computertime= new Date();
SimpleDateFormat time = new SimpleDateFormat("E M-d-y h:m:s a ");
System.out.println(time.format(computertime));
}
}
public static void main(String[] args) {
abugnoisyclockmainclass.telltime();
}
}