Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • About
  • Cards
  • Rate Tips
  • Tip Sheets

Always use the keyword ‘this’ in Java, and trace through many examples, to help students understand it.

Share Always use the keyword ‘this’ in Java, and trace through many examples, to help students understand it. with FacebookShare Always use the keyword ‘this’ in Java, and trace through many examples, to help students understand it. with Twitter
  • Structure assignments such that the following call must be used: obj.method(this)

More about this tip

Tags

  • Programming Concepts
  • Development Methods
  • Java
External Source

Interview with Steve Vegdahl

Other Tips By
Other Tips By Steve Vegdahl

Similar tips

Emphasize to your students that in languages like Java a semicolon ends a complete thought, rather than just a line of code.
Explain that Java’s return is like a platter where you can hand information between methods to help students create a concrete mental model for an often tricky subject.
Misconception: Students who are familiar with writing code in block-based languages like Scratch still need support transitioning to text-based languages like Java.
  • CSTT Facebook
  • CSTT Twitter

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Footer Icons by Mohammed Alyousfi. Powered by Drupal.

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College