To run programs, go to desired folder ( example: sine-wave ), and run:
javac {THE_NAME_OF_THE_FILE}.java
Then:
java {THE_NAME_OF_THE_FILE}
Make sure you have JRE & JDK installed on your computer.
All of the exercises I found on: Programming By Doing Website