[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-314870-105":59,"doc-detail-314870-en":130},{"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":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","ap-csa-practice-exam-2018-practice-questions","AP CSA Practice Exam 2018 - Practice Questions","","AP CSA Practice Exam 2018 with 12 multiple-choice Java topics covering control flow equivalence, object-oriented inheritance and method overriding, loop-based search logic, Java List operations and index behavior, compile-time type checking in class hierarchies, method overloading/overriding calls with polymorphism, Boolean expression evaluation, array sorting logic with missing loop structure, nested-loop output patterns, minimum iteration counts for nested loops, safe method invocation with casting in inheritance, and 2D array manipulation by copying values across halves.",{"@graph":69,"@context":122},[70,84,105],{"@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-csa-practice-exam-2018-practice-questions/314870/",{"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-csa-practice-exam-2018-practice-questions/314870.png","ImageObject",300,407,{"name":92,"@type":93},"Tawan","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-29","2026-09-20",true,{"@type":102,"interactionType":103,"userInteractionCount":56},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"Which topics does this AP CSA practice exam focus on?","Question",{"text":112,"@type":113},"It covers Java control flow, inheritance and overriding, List/Array operations, boolean logic, loop tracing, and nested-loop iteration counts. It also includes casting and 2D array manipulation.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How many multiple-choice questions are included?",{"text":117,"@type":113},"The provided content contains Questions 1 through 12, each with answer choices labeled (A) through (E) in most cases.",{"name":119,"@type":110,"acceptedAnswer":120},"What programming areas are tested by the missing-code sorting question?",{"text":121,"@type":113},"The sorting question tests understanding of loop bounds and index selection needed to correctly compare and swap elements for ascending order.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},314870,1789901987,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":19,"category_name":20,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":56,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":46,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":31,"preview_page_count":4},2336475104042,"https://ap-avatar.wpscdn.com/avatar/22000c4c32af1715be0?x-image-process=image/resize,m_fixed,w_180,h_180&k=1786537525561427321","AP CSA Practice Exam 2018  \nBarbara Ericson  \nGeorgia Tech  \n1. Which of the following code segments is equivalent to the code below?  \nif (x >= 1) x = x * 3;  \nif (x > 3) x = 0;  \n(A) x = 0 ;  \n(B) if (x > 1) x = 0;  \n(C) if (x > 3) x = 0;  \n(D) if (x >=1) x = 0;  \n(E) none of the above  \n2. Consider the following class definitions.  \npublic class Student {  \npublic String getFood() {  \nreturn \"Pizza\";  \n}  \npublic String getInfo() {  \nreturn \"Studying\";  \n}  \n}  \npublic class GradStudent extends Student {  \npublic String getFood() {  \nreturn \"Taco\";  \n}  \npublic String getInfo() {  \nsuper .getInfo();  \nreturn \"Eating\";  \n}  \n}  \nWhat is printed when the following code is executed?  \nStudent s = new GradStudent();  \nSystem .out .println(s .getInfo());  \n(A) Pizza  \n(B) Taco  \n(C) Studying  \n(D) Eating  \n(E) Studying Eating  \n3. Given the following code which of the answers best describes the conditions needed for temp to be true when it is returned?  \nboolean temp = false;  \nint count = 0;  \nfor (int testVal : a)  \n{  \nif (testVal == val)  \n{  \ntemp = true;  \nreturn temp;  \n}  \n}  \nreturn temp;  \n(A) Whenever the first element in a is equal to val  \n(B) Whenever a contains any element which equals val .  \n(C) Whenever more than 1 element in a is equal to val .  \n(D) Whenever exactly 1 element in a is equal to val .  \n(E) Whenever the last element in a is equal to val .  \n4. Consider the following code segment.  \nList\u003CString> list = new ArrayList\u003CString>();  \nlist .add(\"a\");  \nlist .add(\"b\");  \nlist .set(1,\"c\");  \nlist .add (2, \"d\");  \nlist .set (2, \"e\");  \nlist .add(\"g\");  \nSystem.out.println(list);  \nWhat is printed as a result of executing the code segment?  \n(A) [a, c, e, d, g]  \n(B) [c, e, d, b, g]  \n(C) [a, c, e, g]  \n(D) [a, b, e, d, g]  \n(E) [a, c, e, d, b, g]  \n5. Given the following class declarations:  \npublic class Car {  \nprivate String make;  \npublic Car(String theMake) {  \nmake = theMake; }  \npublic String getMake() {  \nreturn make;  \n}  \n}  \npublic class ElectricCar extends Car {  \npublic ElectricCar() {  \nsuper(\"Ford\");  \n}  \npublic ElectricCar(String theMake) { super(theMake);  \n}  \n}  \nWhich of the following will cause a compile time error?  \n(A) Car myCar = new Car();  \n(B) Car myCar1 = new ElectricCar();  \n(C) ElectricCar myCar2 = new ElectricCar(\"Ford\");  \n(D) Car myCar3 = new Car(\"Ford\");  \n(E) Car myCar4 = new ElectricCar(\"Toyota\");  \n6. Given the following declarations.  \npublic class Vechicle {  \npublic void test(Car x, SportsCar y) {}}  \npublic class Car extends Vechicle {  \n}  \npublic class SportsCar extends Car {  \n}  \nAlso consider the following code that appears in a different class.  \nVechicle v = new Vechicle ();  \nCar c = new Car ();  \nSportsCar sporty = new SportsCar ();  \nWhich of the following is a correct call to test?  \n(A) v .test(sporty,v);  \n(B) sporty .test(c,c);  \n(C) v .test(sporty,c);  \n(D) sporty .test(sporty,v);  \n(E) c.test(sporty,sporty);  \n7. When is the following Boolean expression true (a and b are integers)?  \n(a \u003C b) && !(b > a)  \n(A) Always true  \n(B) Never true  \n(C) a = b  \n(D) a \u003C b  \n(E) a > b  \n8. The following incomplete method is intended to sort the array a in ascending order.  \npublic void sort() {  \nint maxCompare = a .length - 1;  \nint lIndex = 0;  \nint temp = 0;  \nfor (int i = maxCompare; i > 0; i--) {  \nlIndex = i;  \nfor ( /* missing code */ ) {  \nif (a[j] > a[lIndex]) {  \nlIndex = j;  \n}  \n}  \ntemp = a[i];  \na[i] = a[lIndex];  \na[lIndex] = temp;  \n}  \n}  \nWhich of the following could be used to replace /* missing code */ in the code above so that the method always sorts the array a in ascending order?  \n(A) int j = i - 1 ; j >= 0 ; j--  \n(B) int j = i + 1 ; j \u003C a .length; j++  \n(C) int j = i; j \u003C a .length; j++  \n(D) int j = i; j >= 0 ; j--  \n(E) int j = i - 1 ; j > 0 ; j--  \n9. Which of the following code will produce the following output?  \n1  \n22  \n333  \n4444  \nI.  \nfor (int i = 1; i \u003C 5; i++) {  \nfor (int j = i; j > 0; j--) {  \nSystem.out.print(i+1);  \n}","cbCaiuGQTb5aAMI8","https://ap.wps.com/l/cbCaiuGQTb5aAMI8","pdf",281263,"English","# Questions\n## Java language concepts\n## Arrays and collections\n## Output tracing and complexity","[{\"question\":\"Which topics does this AP CSA practice exam focus on?\",\"answer\":\"It covers Java control flow, inheritance and overriding, List/Array operations, boolean logic, loop tracing, and nested-loop iteration counts. It also includes casting and 2D array manipulation.\"},{\"question\":\"How many multiple-choice questions are included?\",\"answer\":\"The provided content contains Questions 1 through 12, each with answer choices labeled (A) through (E) in most cases.\"},{\"question\":\"What programming areas are tested by the missing-code sorting question?\",\"answer\":\"The sorting question tests understanding of loop bounds and index selection needed to correctly compare and swap elements for ascending order.\"}]","AP CSA Practice Exam 2018 - Practice Questions | PDF"]