Skip to main content
CS Teaching Tips

Main navigation

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

Misconception: Students create a new instance variable when they only need a local variable.

  • For example, in Java, students create an instance variable public int count that is only used in one method, so they should instead create a local variable.

More about this tip

Tags

  • Content Misconceptions
  • CS 1
  • Intro Programming
  • Java
External Source

"Exploring programming misconceptions: an analysis of student mistakes in visual program simulation exercises" by Teemu Sirkiä and Juha Sorva.

Other Tips By
Other Tips By Juha Sorva
Juha Sorva

Similar tips

Misconception: Return is a mystery to students because they may not understand that functions have an entry point and an exit point. This results in mistakes such as assuming Python will return the right thing.
Focus on simple examples in a breadth course about systems to avoid confusing students. Save depth for upper level courses.
Avoid drawing undue attention to differences between students, such as pointing out a student’s disability, to ensure all students feel comfortable in your classroom.

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

Privacy Policy