AP Computer Science A Practice Test
This AP Computer Science A Practice Test is a comprehensive assessment designed to evaluate mastery of the core topics covered in the AP Computer Science A curriculum. It consists of 90 questions that span the full range of required content, including 2D Arrays, Arrays, ArrayLists, Boolean Expressions and if Statements, Inheritance, Iteration, Primitive Types, Recursion, Using Objects, and Writing Classes. The test is intended for high school students preparing for the AP exam, self-learners seeking to validate their understanding, or educators looking for a rigorous benchmark. By taking this practice test, you will gain a clear measure of your proficiency in object-oriented programming, algorithm design, and problem-solving using Java. You will also develop the ability to trace code, identify logical errors, and apply key concepts such as polymorphism, recursion, and array traversal. The test emphasizes both conceptual understanding and practical coding skills, mirroring the style and difficulty of the actual AP exam. Upon completion, you will have a detailed diagnostic of your strengths and areas for improvement, enabling targeted study and increased confidence for the official exam.
नमूना प्रश्न
पूरी परीक्षा कैसी है देखने के लिए कुछ प्रश्न आज़माएं।
90 में से 48 उत्तरों में जाँचने योग्य संदर्भ है।
Which notation accesses or modifies a 2D array element by row and column?
कौन सी नोटेशन 2D एक्सेस करती या मॉडिफाई करती है एक 2D आरे और कॉलम के द्वारा?
A सही है क्योंकि उद्धृत कथन कहता है कि [row][col], पंक्ति पहले, स्तंभ दूसरे। B गलत है क्योंकि संदर्भ कहता है कि पहले पंक्तियाँ, दूसरे स्तंभ। C गलत है क्योंकि संदर्भ कहता है कि एक्सेस और मॉडिफाई। D गलत है क्योंकि संदर्भ 2D आरे के बारे में है।
Which statement is true when an array stores object references?
एक सरणी जो ऑब्जेक्ट रेफरेंस स्टोर करती है, उस पर कौन सा बयान सही है?
A गलत है क्योंकि संदर्भित संदर्भ कहते हैं कि विशेषताएं बदली जा सकती हैं। B गलत है क्योंकि संदर्भित मामला ऑब्जेक्ट रेफरेंस स्टोर करने वाली सरणियों का है। C सही है क्योंकि संदर्भित बयान ऑब्जेक्ट विशेषताओं को बदलने को अलग करता है और सरणी में संग्रहीत रेफरेंस को बदलने से। D गलत है क्योंकि संदर्भित संदर्भ कहते हैं कि सरणी में संग्रहीत रेफरेंस बदलते नहीं हैं।
A Double object is automatically used where a double value is expected. What is the conversion called?
एक डबल ऑब्जेक्ट स्वचालित रूप से तब उपयोग किया जाता है जब एक डबल मान की अपेक्षा की जाती है। इस परिवर्तन का नाम क्या है?
A गलत है क्योंकि नल असाइनमेंट अनबॉक्सिंग से संबंधित नहीं है। B सही है क्योंकि उद्धृत कथन अनबॉक्सिंग को वर्णन करता है जो व्रैप्पर क्लास से प्राइमिटिव टाइप में परिवर्तन है। C गलत है क्योंकि वह विपरीत दिशा का वर्णन करता है। D गलत है क्योंकि संदर्भित संदर्भ व्रैप्पर क्लास और प्राइमिटिव टाइप पर चर्चा करता है।
A variable must store a real number, an integer, or a truth value. Which primitive set covers these needs?
एक चर को एक वास्तविक संख्या, एक पूर्ण संख्या या एक सत्यता मान संग्रहीत करना होगा। जो मूल सेट इन आवश्यकताओं को पूरा करता है?
A सही है क्योंकि स्रोत के नाम int, double और boolean हैं और उनके मान श्रेणियों का परिभाषित करते हैं। B गलत है क्योंकि String इन तीन मूल प्रकारों में से एक नहीं है। C गलत है क्योंकि वे पाठ्यक्रम मूल सेट नहीं हैं। D गलत है क्योंकि वेपर/ऑब्जेक्ट प्रकार मूल नामित सूची में नहीं हैं।
A program executes `new ArrayList()`. What initial contents should be expected?
एक कार्यक्रम new ArrayList() को निष्पादित करता है। इसके शुरुआती सामग्री क्या होनी चाहिए?
A सही है क्योंकि स्रोत के अनुसार, ArrayList कंस्ट्रक्टर एक खाली सूची बनाता है। B गलत है क्योंकि संदर्भ के अनुसार खाली सूची है। C गलत है क्योंकि संदर्भ एक ArrayList के बारे में है और खाली सूची कहता है। D गलत है क्योंकि संदर्भित कंस्ट्रक्टर का व्यवहार शारीरिक नहीं है।