java examples
Home Java Examples Resources Java Interview Questions
Brainpower SEO

How to create a beep sound?

package com.javacoderanch.example.awt;

import java.awt.*;

public class BeepExample {
    public static void main(String[] args) {
        // This is the way we can send a beep audio out.
        Toolkit.getDefaultToolkit().beep();
    }
}