Originally posted here by janosa
the equivalent is a single beep. putting the conversion in a for statement it does it 5000000 times right? wrong again! if youll look in the brackets of the for statement it has the command 'k--;' which tells java to subtract 1 from integer k (the integer running the for statement) every time it runs through the for statement. so in essence it will sit and beep unendingly.
Ahhh... I see. Seems like a roundabout way of doing it.

You could really cut your code down by doing this:

while(true)
System.out.println((char) + 7);


Of course you need all your brackets and every other call needed to run it, but still.

Anyway, none of that answers your question on changing the pitch. I'm sure there is a way to do it, possibly by creating a .wav file that it calls over and over again. However, the reasoning for doing it just doesn't click with me and I don't really want to work on finding a solution for such a useless cause.

Good luck in your studies!

-Deeboe