You could use "\r" to take you back to the beginning of the line, then overwrite like:
import java.io.*;
class tmp {
public static void main (String argv[]) {
System.out.print ("hello\rgoodbye");
}
}
or you could use backspaces in the same way, which might be more portable
import java.io.*;
class tmp {
public static void main (String argv[]) {
System.out.print ("Hallo\b\b\b\b\bGoodbye");
}
}
--
Don't Stand on your head - you'll get footprints in your hair.
http://charlieharvey.com