Java training examples