Added javadoc to Q.java