I am a Java newbie, so please bear with me and help.
I aim to first play then record sound.
I use netbeans IDE 6.8. Here is the code:
import java
While there may be more formal resources to explain this (e.g. the Java Language Specification), I frequently find myself checking this webpage for these kinds of questions:
http://mindprod.com/jgloss/jgloss.html
It explains these things quite well, also for noobs ;-) In your case: