Java Assignment Questions