私はいくつかのテキスト文字を文字ごとに少し遅れて印刷しようとしていますが、問題はそれが待ってから待ってから文全体を印刷することです。文字ごとに文字列を出力し、終了したらその文字列を出力するようなものです。
public static void printWithDelay(String data, TimeUnit unit, long delay)
throws InterruptedException {
for (char ch : data.toCharArray()) {
System.out.print(ch);
unit.sleep(delay);
}
}
助けてください (: