Skip to content

Commit

Permalink
ADD delay 10ms per a charcter
Browse files Browse the repository at this point in the history
  • Loading branch information
remixgrjp committed Feb 23, 2024
1 parent 128681a commit a982157
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Main.java
@@ -1,16 +1,19 @@
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main{
public static void main( String[] args ){
BufferedReader br= new BufferedReader( new InputStreamReader( System.in ) );
try{
String s;
while( null != ( s= br.readLine() ) ){
System.out.println( s );
for( int i= 0; i < s.length(); i++ ){
System.out.print( s.charAt( i ) );
Thread.sleep( 10 );
}
System.out.println( "" );
}
}catch( IOException e ){
}catch( Exception e ){//readLine(),sleep()
e.printStackTrace();
}
}
Expand Down

0 comments on commit a982157

Please sign in to comment.