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

Teach students to storyboard in Alice so they know a systematic process to follow when approaching challenging problems.
Give commands to an imaginary person sitting in an empty desk to model what happens when you give commands to an object that hasn’t been instantiated to help students understand null pointer exceptions.
Highlight key differences between math, CS, and engineering to give students context for why CS is a distinct field in itself. Let students know that you don’t necessarily have to excel in one field to excel in the others.
  • 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