Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

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.

  • This activity helps students realize one of the common situations where a null pointer exception might incur.

More about this tip

Tags

  • Development Methods
  • Meaningful and Relevant Content
External Source
Interview with Ria Galanos
Other Tips By
Other Tips By Ria Galanos

Similar tips

Trace through nested conditionals with students because nesting makes it difficult for them to track which lines of code get executed when.
Have a student write out detailed instructions for performing a basic task, then have another student try to follow these instructions exactly. Engaging, interactive classroom activities like this demonstrate that program instructions need to be explicit.
Choose an appropriate IDE that fits course goals. For AP CS, use an IDE that doesn’t autofill to give students more practice writing code on their own

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

Privacy Policy