Java programs for practice and testing