Created
May 30, 2012 17:37
-
-
Save pcostesi/2837833 to your computer and use it in GitHub Desktop.
ejemplo 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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