NoisyButton.java Source code

Java tutorial

Introduction

Here is the source code for NoisyButton.java

Source

import java.applet.Applet;
import java.applet.AudioClip;

public class NoisyButton {

    public static void main(String[] args) throws Exception {
        java.io.File file = new java.io.File("bark.aiff");
        AudioClip sound = Applet.newAudioClip(file.toURL());
        sound.play();
    }
}