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.

Share Misconception: Students create a new instance variable when they only need a local variable. with FacebookShare Misconception: Students create a new instance variable when they only need a local variable. with Twitter
  • 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

Teach these four Scanner methods that allow students to write interesting code at the beginning of an introductory Java course to give students a feel for programming without overwhelming them.
Prototype Makey Makey, a simple invention kit for the classroom that helps students turn everyday items into keyboard buttons, to bring Scratch programming projects into the real world and engage your students.
Have students analyze the effects of changing pieces of a loop to improve their understanding of loop structure.
  • 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