Skip to main content
CS Teaching Tips

Main navigation

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

Misconception: Students don’t realize that the keyword return causes Java to leave the current method.

  • Make sure your students know that any code inside their methods placed under the keyword return will not execute!

More about this tip

Tags

  • Java
  • Development Methods
  • Content Misconceptions
External Source

Interview with Serita Nelesen.

Other Tips By
Other Tips By Serita Nelesen

Similar tips

When tracing through code in Java, use different colors for code that is executed in a main method versus in a class method.
Students have trouble seeing the connection between models (UMLs, etc.) and code so they only want to focus on coding, a problem when teaching modeling.
Misconception: Students may think that assigning one array to point to another array makes a copy of that array, failing to make a distinction between shallow and deep copies.

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

Privacy Policy