Background: In universities, the course of Java programming is widely offered.It contains many contents and is practical. Therefore, learning Java programming is considered to be a difficult and challenging task for beginners. That is to say, students must learn a lot of programming skills in order to effectively master the course. However, it is often reported that the result of teaching Java programming is poor, mainly reflected in the stereotyped teaching methods, lack of project development experience and so on. In order to investigate and solve these problems, many educational experts have conducted in-depth research about it. CDIO (Conceiving-Designing-Implementing-Operating) engineering education model is the latest achievement of engineering education reform in recent years. It is a life cycle from product development to product operation as the carrier, which enables students to learn engineering in an active, practical and comprehensive way. For the problems in Java programming course, the concept of CDIO engineering is introduced to solve them. Methods: Firstly, the research status of Java programming course and the application of CDIO model were analysed. Secondly, the current situation of learning was analysed by means of questionnaire survey. At the same time, the main problems existing in the current teaching project were listed. Following this, the questionnaire method was used to analyse the current learning situation of Java programming course. The ideas of CDIO engineering education and iteration mode were applied to Java programming course. From various perspectives, this paper makes a detailed analysis of the development methods and strategies of the new teaching mode. Finally, the teaching model was applied to the existing teaching process. The teaching effect of the model was verified by data statistics. Results: The experimental results show that the new teaching mode encouraged students to master programming knowledge as well as problem-solving strategies. Students' interest in learning has been increased and their comprehensive ability has also been improved. Compared with traditional teaching methods, teachers tend to adopt CDIO teaching methods. The data statistics of teaching effect include six aspects: learning initiative, learning interest, knowledge-related ability, communication ability and practical ability, practical skills and final examination scores. The final exam results also showed that students with the new method performed better than those being taught with the older teaching method. Conclusion: A new teaching model based on graded iteration and CDIO Engineering education mode is proposed for the problems existing in the teaching process of Java programming course. This paper creatively combines CDIO engineering ideas with Java programming course, and introduces the idea of hierarchical iteration. According to this idea, the knowledge structure of the course is put forward, and the teaching method of CDIO is adopted to attract students to study Java programming. The basic characteristics of the teaching mode are that the project is taken as the main line, the teacher as the leading role, and the students as the main body, so as to cultivate the students' comprehensive engineering ability. By strengthening the classroom teaching and practice teaching, the new model improves the Java teaching process, and enhances the teaching effect. The teaching practice proves that the new teaching model can mobilize the enthusiasm of students and improve the students' practical ability. It is worthy of popularizing.