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.
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.
Use dice to introduce instantiable classes in Java because it’s easier for novice students to create classes based on a familiar object.
Misconception: Students have trouble distinguishing between instance variables and parameters in Java.
Misconception: Students have trouble understanding the difference between checked and unchecked exceptions in Java.
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: 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.
Have students translate between Java Array and ArrayList to highlight the differences between the two.
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.