Category Archives: AP Computer Science

String Loop AP CS A Practice Multiple Choose Question

Below is an AP styled multiple choice question involving involving a while loop over a string and the indexOf() method. What is the result of the call to the method [crayon-5f044b70ead05297013463-i/] [crayon-5f044b70ead18298047721-i/]  Error returns 1 infinite loop returns 3 returns 2   [crayon-5f044b70ead1d333553100/]   Scroll down  for answer.   The answer is [crayon-5f044b70ead21733087769-i/]  Error returns 1 infinite … Continue reading String Loop AP CS A Practice ...

RandomLetterChoose AP A-thoughts and analysis

One of the 2016 AP Computer Science A questions, [crayon-5f044b70ed5d1671969525-i/] ,  asked students to write a class declaration from scratch. The constructor receives a parameter of non-null Strings The class has a [crayon-5f044b70ed5db599169437-i/]  method that returns a random [crayon-5f044b70ed5df876382174-i/] from that list . Each element in the list can only be returned once, and after all of the elements … Continue reading RandomLetterChoose AP A-thoughts and analysis &rarr...

AP Computer Science Array Practice Problem

The AP Computer Science A exam likes to ask questions along the lines of this code pictured below: Download Code The question is,.. what does the “mystery” method do to that input array ?…. What is the output ?   And the answer is… Scroll down a bit         [crayon-5f044b70ed9e5119774187/]   Yes, this … Continue reading AP Computer Science Array Practice Problem →