






In the evolving landscape of education, technological advancements have significantly influenced teaching practices. Among these, artificial intelligence (AI) stands out as a transformative force, particularly in the field of programming education. This paper explores the effect of integrating ChatGPT, a generative artificial intelligence tool, into JAVA programming courses on students' computational thinking skills and programming self-efficacy. Two research questions and two hypotheses were formulated to guide the study. Utilizing an experimental design with pretest-posttest control groups, the study involved 45 participants from University of Uyo in Nigeria. The experimental group utilized ChatGPT for coding assistance during lab assignments, while the control group did not. Two instruments were used for the study: Computer programming self-efficacy questionnaire and Computational thinking questionnaire. The instruments were validated. Descriptive statistics of mean and standard deviation was used to answer research questions and Analysis of Covariance (ANCOVA) was used to test the hypotheses. Results indicated significant improvements in both computational thinking scores and programming self-efficacy among students in the experimental group compared to the control group. Findings suggest that ChatGPT-supported education positively affect students' confidence in programming abilities and enhances their problem-solving and critical thinking skills. The study underscores the potential of AI tools in enhancing programming education and offers recommendations for educators to effectively integrate such technologies into their teaching practices.