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 popular, repetitive music to teach loops in a beginning course because this motivates the purpose and application of loops while keeping students engaged by referencing popular culture.
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.
Misconception: If you consistently use the same variable names during class in lectures and examples, students may incorrectly assume objects in Java can only have those names.