Skip to content

Instantly share code, notes, and snippets.

@aerodame
Last active August 29, 2015 14:18
Show Gist options
  • Save aerodame/b04b3fbd8964d43b350e to your computer and use it in GitHub Desktop.
Save aerodame/b04b3fbd8964d43b350e to your computer and use it in GitHub Desktop.
CSS430 - Program 1 - PingPong
public class PingPong extends Thread {
private String word;
private int loop;
public PingPong( String[] args ) {
word = args[0];
loop = Integer.parseInt( args[1] );
}
public void run( ) {
for ( int j = 0; j < 100; j++ ) {
SysLib.cout( word + " " );
for (int i = 0; i < loop; i++ );
}
SysLib.cout( "\n" );
SysLib.exit( );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment