Play musical chairs to explain while loops so students develop physical experience navigating through the structure of a loop to better understand while loops.
Foreshadow arrays right after teaching for loops by showing students how to create a 1x6 grid using the rectangle object in the Java objectdraw library because visualizations built off of recently introduced material provide a useful transition.
Use note passing for explaining the difference between methods with no return (void methods) and methods with return to provide students with a relatable example.
Explain nested for loops using a car odometer, the innermost loop controlling the ones digit must cycle fully before the outer loops steps forward, to help students better understand nested loops through a real world example.
Misconception: The update in the index in a for loop (i.e., the third part of the for loop control statement) happens after the all the steps inside of the loop have happened.
Start by having students transpose code from one loop type to the other when teaching all the different conditionals for the AP CS A exam.
Use short video lessons for middle school age students to keep their attention on the content because students struggle to focus on demos at the board at this age.
Tell students they have to believe that some things just work before they will understand why it works because they need exposure to a lot of material before some concepts make sense individually.
Create notes that look like Javadocs instead of introducing Javadocs so students are scaffolded in reading Javadocs without being overwhelmed by all the material available.
Teach these four Scanner methods that allow students to write interesting code at the beginning of an introductory Java course to give students a feel for programming without overwhelming them.