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

Misconception: students develop the habit of putting the type in front of variables; they don’t realize that this creates a new variable resulting in lots of variables with the same name.
Ask students “What were you trying to do?” when they ask for help to help answer their own questions because they may already have the skills to debug their own Scratch programs.
Create boolean variables to use as the condition when introducing if statement to highlight for students that the condition is any expression that evaluates to true or false.
  • 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