Skip to content

Instantly share code, notes, and snippets.

@pcostesi
Created May 30, 2012 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcostesi/2837833 to your computer and use it in GitHub Desktop.
Save pcostesi/2837833 to your computer and use it in GitHub Desktop.
ejemplo 1
class ThreadedMusicPlayer implements Runnable{
public ThreadedMusicPlayer(){
Thread thread = new Thread(this);
thread.start();
}
void run(){
while (true){
playMusic();
}
}
}
class Main{
public static void main(){
new ThreadedMusicPlayer();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment