Use SRec, a recursion visualization tool, in your introductory Java courses to help students conceptualize the recursive algorithms they write.
Have students create a game of Tetris in Java to work on object-oriented programming and decomposing complex programs.
Have students write many small, simple classes in Java to scaffold their learning of the basics of object-oriented programming.
Have students create a Burrito class in Java to practice object-oriented programming using an object they are familiar with.
Have students write a program that constructs an n x n Magic Square in Java so they gain practice working with bounds in 2D arrays.
Have students translate between Java Array and ArrayList to highlight the differences between the two.
Misconception: When students use the division operator during declaration or assignment of a Double in Java, like double x = a/b, they forget about integer division, which can result in rounding errors.
Write an exception inside of a loop, then outside of a loop when live-coding so that students learn the effects of placement on exceptions.
Misconception: Students have trouble understanding the difference between checked and unchecked exceptions in Java.
Misconception: Students have trouble distinguishing between instance variables and parameters in Java.
Use dice to introduce instantiable classes in Java because it’s easier for novice students to create classes based on a familiar object.
Demonstrate manipulating primitives with operators before manipulating them with methods so students can understand the basics of primitives before using them in a more complicated way.
Misconception: Students who first learn object-oriented programming in Python don’t realize they need to explicitly define instance variables in Java because this is done implicitly in Python.
Misconception: Students get confused with object-oriented programming in Python because function declarations explicitly take self as an argument, but function calls don’t use self as argument.
Encourage students to replace variables with values when tracing through code to reduce the necessary cognitive load.
Discuss and explore the difference between additive (sequential) and multiplicative (nested) loop structures to give students practice reasoning about loops.