What are the reasons that AP Computer Science A is using Java as its programming language?

While Java is a great language in general, it has high verbosity, which is quite important for a timed exam.

How about other programming languages, perhaps something more modern, like Rust, Go, or Dart? Or even C++?

  • 4
    $\begingroup$ C++ has a lot of gotcha's that get in the way for beginners. $\endgroup$
    – Buffy
    Sep 22 '20 at 21:58
  • $\begingroup$ If you had not mentioned C++, then I would agree. $\endgroup$ Sep 24 '20 at 21:13
  • $\begingroup$ @ctrl-alt-delor I agree with you. I edited my question to remove any personalization. $\endgroup$
    – Marwi
    Oct 1 '20 at 7:56

Particularly since they have recently removed interfaces and abstract classes, I would say that there are no particularly important philosophical reasons that they are using Java. At this point, it was a historical decision.

The exam began in Pascal, and when they looked for a way to move towards Object Orientation, they switched (in 1996) to C++. This was controversial at the time, as Java was very modern and was thought by many to be a conceptually better language, particularly for students.

They switched from C++ to Java in the 2003-2004 school year largely for two reasons:

  1. Java was considered to be a better object-oriented language, particularly with regards to inheritance, and the compiler does a much better job at checking to make sure that beginners aren't doing silly things that they definitely shouldn't be doing.
  2. College programs around the country were taking up Java, so it better reflected the reality of the introductory courses that students would be getting credit for.

You can read the justification for the switch to Java courtesy of the ever-magical wayback machine.

Given the recent changes to the AP Test, it does not appear that there is any particular good pedagogical reason to stick with Java at this point. In fact, the latest iteration of the test basically ignores the most important features of OO, instead emphasizing a great number of imperative concepts. However, the testing language is unlikely to change any time soon, as Java is still the dominant language at universities for teaching introductory Computer Science, and these are the institutions that must agree to provide credit if the AP exam is to continue to provide value.

  • 1
    $\begingroup$ Last paragraph is the real reason, and distills down to "Because that's what the bosses want." $\endgroup$ Sep 23 '20 at 7:41
  • $\begingroup$ Java is ubiquitous at UNC, NCState, and Duke. This is where we send a lof of our students. $\endgroup$ Nov 18 '20 at 22:24

It takes a lot of time and a lot of infrastructure to set up for a new language in AP CS. At the time of its creation, Java was much simpler than today and had a lot of desirable characteristics, including a pretty good graphic layer. So, proposals were made and a lot of effort was put into the infrastructure. That is difficult to abandon.

Starting over with a clean slate, I might pick Python, myself, but others might disagree.

But choosing a professional language for a beginning course comes with a lot of issues. I found, back when I was a serious C++ programmer, that I could write some beautiful stuff, but the language fought me every inch of the way. That isn't something I'd like to put on a novice just starting out.

But an AP course is a lot more than just a language and a few exercises.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.