Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • About
  • Cards
  • Rate Tips
  • Tip Sheets

Misconception: Students think that it’s possible to write methods that add attributes to a Java class.

Share Misconception: Students think that it’s possible to write methods that add attributes to a Java class. with FacebookShare Misconception: Students think that it’s possible to write methods that add attributes to a Java class. with Twitter
Like(2587 Likes)
  • Explain to students that the attributes of a Java class are fixed upon its creation.
  • Explain that even though that's not how Java works, it is a reasonable idea and many languages allow that (e.g. JavaScript, Ruby, & Python).

More about this tip

Tags

  • Content Misconceptions
  • CS 1
  • Intro Programming
External Source

"Visual program simulation in introductory programming education" by Juha Sorva.

Other Tips By
Other Tips By Juha Sorva

Similar tips

Show students explicitly how objects and variables might have other names (i.e., aliasing) to help students understand that variable names don’t have to match parameter names because students often find this confusing.
Misconception: Students often think that classes hold Objects rather than understanding that they’re a blueprint for Objects because of the main method.
Use CodingBat problems to supplement Java and Python curricula to give students more practice.
  • 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