1 import javax. sound. sampled. 2 import javax. sound. sampled. DataLine 3 impor
ID: 3672388 • Letter: 1
Question
1 import javax. sound. sampled. 2 import javax. sound. sampled. DataLine 3 import java applet. 4 import java.net. 5 public class Audio{ public static void main (String[ args) 7 try AudioClip clip Applet. newAudioclip (new URL file://Users/carolinehardison/Desktop/EC/FunPiano.wav Thread. Sleep (25000) clip play 10 12 catch (MalformedURLException murle) 13 System.out.println (murle) 14 15 16 Coin, java Audio java Compile Messages jGRASP Messages Run I/O Interactions Stop ----j GRASP exec javac g Audio. java. Audio. java: 9: error: unreported exception InterruptedException must be caught or declared to be Clear Thread. Sleep (25000); 1 error Copy ----j GRASP wedge exit code for process is 1 Line:10 Col: 1 Code: 32 Top: 1 ovs BLKExplanation / Answer
if you want use the Thread in your program your program must be exted
the Thread class or implement the runnable interface..
then these errors will solve
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.