Basic Java IQ codes