Java Compiler and Runtime Errors

CS2 / Java

Authors

  • Kate Holdener Saint Louis University

Abstract

Students often fear compiler errors and start panicking when their code does not compile. This activity teaches the students to read and interpret compiler errors. The activity emphasizes the fact that the compiler is just a computer program, and thus can be confused by bad input, resulting in too many errors or too few errors. Another common student mistake is treating code that compiles as code that works. This activity presents a scenario with a runtime error and helps students understand the difference between compiler and runtime errors. After completing this activity the students will be able to read and interpret errors generated by the Java compiler, fix compiler errors, and explain the differences between a compiler error and a runtime error.

This activity was developed with NSF support through IUSE-1626765. You may request access to this activity via the following link: IntroCS-POGIL Activity Writing Program

Level: undergraduate
Setting: computer classroom
Activity type: Learning Cycle
Discipline: Computer Science
Course: CS2 / Java
Keywords: compiler errors, runtime errors, debugging

 

Downloads

Published

2023-01-08

How to Cite

Holdener, K. (2023). Java Compiler and Runtime Errors: CS2 / Java. POGIL Activity Clearinghouse, 3(4). Retrieved from https://pac.pogil.org/index.php/pac/article/view/313

Issue

Section

CS-POGIL Activity Writing Program