Newsletter

October AP CSA Insider: AP CSA deadlines, webinars, and more!

String Method Tips and Common Mistakes

String methods come up throughout AP CSA, and Part B of the first free-response question on the AP Exam requires students to use them. They can be tricky, since small details are easy to mix up. A few mistakes show up often:

  • The second number in substring(from, to) is where the substring stops, and that character isn’t included. "costume".substring(1, 4) returns "ost". To get a single character as a String, students can use substring(index, index + 1).

  • Strings can’t be changed after they’re created. Calling word.substring(2); on its own line does nothing useful, because the result has to be stored, as in word = word.substring(2);.

  • indexOf returns -1 when it doesn’t find a match, so students should check for that before using the result as an index. Valid indexes run from 0 to length() - 1, and anything outside that range causes a StringIndexOutOfBoundsException.

  • To compare the text in two Strings, students should use equals. The == operator checks whether two variables refer to the same object, so it can return false even when the text matches.

image.png

AP CSA Question of the Day

As you're preparing for your next lesson, don’t forget to check out the CodeHS AP CSA Question of the Day (QOTD)!

CodeHS releases a new multiple-choice question each day that aligns with where you and your students should be in the AP CSA course.

Subscribe to get a daily reminder and answer the question correctly to keep your streak alive!

Teaching other courses? Check out the Question of the Day for AP CSP, Python, and JavaScript!


AP CSA Project of the Month

This month's featured project is The Monty Hall Simulator. In this project, students will recreate the classic paradox from Let's Make A Deal. They start off recreating the final pick-a-door option and then extend this with a simulator to simulate thousands of iterations as they examine this mathematical puzzle. Students will use loops and conditional statements to help solve this problem. This project should take students about 3 hours and includes autograders.


College Board Student Registration Deadline

Just a quick reminder that the College Board’s deadline for full-year AP exam orders is November 13th. Exams ordered after that date have a $40 late fee. Many schools set an earlier deadline so their AP coordinator has time to submit orders, so encourage students to check with their coordinator and register soon!


Free PD for AP CSA Teachers

Missed September’s AP CSA Professional Learning Community? The recording is ready to watch whenever it fits your schedule.

AP CSA Professional Learning Community (PLC) - Watch Now


Request a Visit From CodeHS for CSEdWeek

From November 30th – December 11th, CodeHS team members are visiting classrooms to celebrate Computer Science Education Week! Request a visit from the team or explore Hour of Code and Hour of AI activities you can assign to students during CSEdWeek.


Important Platform Updates

Sep 15 · Java IDE
Help Students Debug Java One Step at a Time
Clear Step Over and Step Into controls, responsive breakpoints, and helpful status messages make Java debugging easier for students to learn and use.

Aug 26 · Java IDE
Faster Java Running
Improvements to how Java compiles and runs mean your students’ programs start much faster.


Get More Out of AP CSA With CodeHS Pro

Track progress live, group students for review, and grade Java faster with Pro tools built for your classroom.


Get Involved & Stay Connected

Bring CodeHS to Your School

Proud to partner with schools around the world—bring the top K-12 CS platform to your school today!

CodeHS

The top platform for coding and computer science in K-12 schools.