[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-470493-105":59,"doc-detail-470493-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","ap-computer-science-a-course-and-exam-description-exam-information-v1-sample-exam-questions","AP Computer Science A Course and Exam Description - Exam Information V.1 - Sample Exam Questions","","Sample exam questions illustrating how the course framework aligns with the AP Computer Science A Exam, including examples of question types. Sections focus on multiple-choice items that test Java concepts such as arithmetic with integer division, string manipulation using substring and indexOf, random number generation with Math.random, conditional logic and boundary cases, Boolean expressions with && and !, looping with while conditions, array iteration, method headers for accessing private fields, and correctness fixes for code segments.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":20,"@type":76,"position":81},"https://docshare.wps.com/document/exam/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/ap-computer-science-a-course-and-exam-description-exam-information-v1-sample-exam-questions/470493/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/ap-computer-science-a-course-and-exam-description-exam-information-v1-sample-exam-questions/470493.png","ImageObject",300,407,{"name":92,"@type":93},"Finn","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-19","2026-09-30",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What relationship do the sample exam questions illustrate?","Question",{"text":113,"@type":114},"They illustrate the relationship between the course framework and the AP Computer Science A Exam, showing example question types that appear on the exam.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"Which programming topics are tested in the multiple-choice questions?",{"text":118,"@type":114},"The questions cover Java fundamentals such as integer arithmetic and operator precedence, String substring/indexOf usage, Math.random-based ranges, conditional branching, Boolean logic, loops, array iteration, and method accessibility.",{"name":120,"@type":111,"acceptedAnswer":121},"How can some code segments in the questions be corrected?",{"text":122,"@type":114},"Corrections target typical issues like incorrect loop boundaries, improper String comparisons or conditions, and flawed logic for boundary values so the code produces the intended output.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},470493,1791133809,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":19,"category_name":20,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":44,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145,"preview_page_count":19,"preview_urls":146},34359740700684,"https://ap-avatar.wpscdn.com/avatar/1f400023980c374ae676?_k=1777273430885731487","Sample Exam Questions  \nThe sample exam questions that follow illustrate the relationship between the course framework and the AP Computer Science A Exam and serve as examples of the types of questions that appear on the exam. After the sample questions is a table that shows to which skill, learning objective(s), and unit each question relates. The table also provides the answers to the multiple-choice questions.  \nSection I: Multiple-Choice  \n1. Consider the following code segment.  \nint a = 5 ;  \nint b = 2 ;  \ndouble c = 3 .0;  \nSystem.out.println(5 + a / b * c- 1);  \nWhat is printed when the code segment is executed?  \n(A) 0.666666666666667  \n(B) 9.0  \n(C) 10.0  \n(D) 11.5  \n(E) 14.0  \n2. Consider the processWords method. Assume that each of its two parameters is a String of length two or more.  \npublic void processWords(String word1, String word2)  \n{  \nString str1 = word1 .substring(0, 2);  \nString str2 = word2.substring(word2.length() - 1);  \nString result = str2 + str1;  \nSystem.out.println(result.indexOf(str2));}  \nAP Computer Science A Course and Exam Description Exam Information V.1 | 191  \nReturn to Table of Contents  \n© 2020 College Board  \nWhich of the following best describes the value printed when  \nprocessWords is called?  \n(A) The value 0 is always printed.  \n(B) The value 1 is always printed.  \n(C) The value result.length() - 1 is printed.  \n(D) A substring containing the last character of word2 is printed.  \n(E) A substring containing the last two characters of word2 is printed.  \n3. Which of the following statements assigns a random integer between 25 and 60, inclusive, to rn?  \n(A) int rn = (int) (Math.random() * 25) + 36;  \n(B) int rn = (int) (Math.random() * 25) + 60;  \n(C) int rn = (int) (Math.random() * 26) + 60;  \n(D) int rn = (int) (Math.random() * 36) + 25;  \n(E) int rn = (int) (Math.random() * 60) + 25;  \n4. Vehicles are classified based on their total interior volume. The classify method is intended to return a vehicle classification String value based on total interior volume, in cubic feet, as shown in the table below.  \n\n| Vehicle size class | Total interior volume |\n| --- | --- |\n| Minicompact | Less than 85 cubic feet |\n| Subcompact | 85 to 99 cubic feet |\n| Compact | 100 to 109 cubic feet |\n| Mid-Size | 110 to 119 cubic feet |\n| Large | 120 cubic feet or more |\n\nThe classify method, which does not work as intended, is shown below.  \npublic static String classify(int volume){  \nString carClass = \"\";  \nif (volume >= 120)  \n{  \ncarClass = \"Large\";  \n}  \nelse if (volume \u003C 120)  \n{  \ncarClass = \"Mid-Size\";  \n}  \nelse if (volume \u003C 110)  \n{  \ncarClass = \"Compact\";  \n}  \nelse if (volume \u003C 100)  \n{  \ncarClass = \"Subcompact\";  \n}  \nAP Computer Science A Course and Exam Description Exam Information V.1 | 192  \nReturn to Table of Contents  \n© 2020 College Board  \nelse  \n{  \ncarClass = \"Minicompact\";  \n}  \nreturn carClass;}  \nThe classify method works as intended for some but not all values of the  \nparameter volume. For which of the following values of volume would the  \ncorrect value be returned when the classify method is executed?  \n(A) 80  \n(B) 90  \n(C) 105  \n(D) 109  \n(E) 115  \n5. Which of the following best describes the value of the Boolean expression shown below?  \na && !(b || a)  \n(A) The value is always true.  \n(B) The value is always false.  \n(C) The value is true when a has the value false, and is false otherwise.  \n(D) The value is true when b has the value false, and is false otherwise.  \n(E) The value is true when either a or b has the value true, and is false otherwise.  \n6. Consider the following code segment.  \nint val = 48;  \nint div = 6;  \nwhile ((val % 2 == 0) && div > 0)  \n{  \nif (val % div == 0)  \n{  \nSystem.out.print(val + \" \");  \n}  \nval /= 2;  \ndiv- - ;}  \nAP Computer Science A Course and Exam Description Exam Information V.1 | 193  \nReturn to Table of Contents  \n© 2020 College Board  \nWhat is printed when the code segment is executed?  \n(A) 48 12 6  \n(B) 48 12 6 3  \n(C) 48 12 6","cbCaiq89wPMzxKTv","https://ap.wps.com/l/cbCaiq89wPMzxKTv","pdf",263360,"English","# Section I: Multiple-Choice\n## Question 1: Arithmetic with code\n## Question 2: Strings and indexOf\n## Question 3: Random integer generation\n## Question 4: Classification logic for vehicle volumes\n## Question 5: Boolean expression evaluation\n## Question 6: Looping and conditional printing\n## Question 7: Method header for private variable access\n## Question 8: Counting substrings in an array and fixing the loop/conditions\n## Question 9: Updating array elements to their squares","[{\"question\":\"What relationship do the sample exam questions illustrate?\",\"answer\":\"They illustrate the relationship between the course framework and the AP Computer Science A Exam, showing example question types that appear on the exam.\"},{\"question\":\"Which programming topics are tested in the multiple-choice questions?\",\"answer\":\"The questions cover Java fundamentals such as integer arithmetic and operator precedence, String substring/indexOf usage, Math.random-based ranges, conditional branching, Boolean logic, loops, array iteration, and method accessibility.\"},{\"question\":\"How can some code segments in the questions be corrected?\",\"answer\":\"Corrections target typical issues like incorrect loop boundaries, improper String comparisons or conditions, and flawed logic for boundary values so the code produces the intended output.\"}]","AP Computer Science A Course and Exam Description - Exam Information V.1 - Sample Exam Questions | PDF",1790777366,23,[147,151,155,159],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f407db0cad75424b8593bb886861be84.webp",983,1272,{"page_no":14,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/fb8377f300d5da14ae4bec57478a0ec3.webp",982,1270,{"page_no":81,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/9b91277488ab78037a199211dce6dac0.webp",981,1269,{"page_no":19,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ea881c89aaab7212d874f5229a8669b6.webp",980,1268]