In this section we cover and explain Play Sound program in details for freshers and experienced
| previous | Home | Next |
Example
A Program to Play the Sound
import java.applet.Applet;
import java.awt.*;
import java.net.*;
public class PSound extends Applet {
public void init() {
try {
URL url = new URL(getCodeBase(), getParameter("playsound"));
play(url);
}
catch (MalformedURLException e) {
System.err.println(e);
}
}
}
| previous | Home | Next |