The Java programming education to students has been held in a lot of universities and professional schools due to the reliability, portability, and easy learning. To assist this education, our group has developed a Java programming learning system based on the test-driven development method. However, this Web system targets students who have studied Java to some extent. In this paper, we propose a fill-in-the-blank problem function for this system to assist the learning of the Java reserved words by novice Java learners. Our function consists of a teacher service process and a student service process. By the former one, a teacher can generate a fill-in-the-blank problem easily by blanking the specified reserved words randomly from a sample Java code in the database. By the latter one, a student can repeatedly submit answers of a problem until all the questions are correctly solved for self-study. The function is implemented on an existing Web system and is applied to students who are currently learning Java. The questionnaire result confirms the effectiveness of our proposal.