Ensure students develop a mental model for comparison of strings in a physical dictionary because few students use paper dictionaries anymore.
Justify the reason that Java Strings are immutable by showing how Strings might be packed together in the heap to help students resolve incomplete understandings in their mental model.
Misconception: Students often think that classes hold Objects rather than understanding that they’re a blueprint for Objects because of the main method.
Tell students that the data structure linked lists were used for the human genome sequencing project to motivate the value of this structure and increase interest.
Have students brainstorm about the data structure Pandora uses for playlists to help motivate arraylists or linked lists through comparison to everyday life.
Misconception: Students incorrectly assume that Java’s substring method is destructive and wrongly anticipate the original string will change.
Connect search to students’ experience with Ctrl+F or Find in various applications after they’ve written code for a search algorithm to help them understand the value of this concept in their daily lives.