title: Java equivalent of C# system.beep?
body: <p>I am working on a Java program, and I really need to be able to play a sound by a certain frequency and duration, similarly to the c# method System.Beep, I know how to use it in C#, but I can't find a way to do this in Java. Is there some equivalent, or another way to do this?</p>
  
  <pre><code>using System;
  
  class Program
  {
      static void Main()
      {
      // The official music of Dot Net Perls.
      for (int i = 37; i &lt;= 32767; i += 200)
      {
          Console.Beep(i, 100);
      }
      }
  }
  </code></pre>