Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • 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

Use some of the following real world constructs to help beginning students form better understandings of abstract object-oriented principles.
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.
Use the playful phrasing “bracket thief” when students get a common Java error for forgetting to use a closing bracket to remind students of this error in a non-threatening way.
  • 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