Explain how inheritance allows the Java toString method to work when teaching printing to help students develop an understanding for how everything in Java is an object that has hierarchical relationships with other objects.

  • Make sure students learn how a function works. Even if they think something is intuitive, it's important that students understand the mechanisms of functions.
    • toString is an good example of a function students find intuitive. Nevertheless, it’s important to understand how it works mechanically.
  • It is incredibly important for students how objects and inheritance create the basis for Java.
  • Reminding them when teaching them to print statements in Java using the toString() method is a good opportunity to incorporate this early on.

More about this tip

External Source

Interview with Charlie McDowell.