736
GB
What is composition over inheritance principle?
IN
वंशानुक्रम सिद्धांत पर संरचना क्या है?
A
Always use inheritance
हमेशा इनहेरिटेंस का उपयोग करें
B
Prefer building objects from components rather than inheriting
विरासत में मिलने के बजाय घटकों से वस्तुओं का निर्माण करना पसंद करें
C
Never use inheritance
विरासत का उपयोग कभी न करें
D
Only use templates
केवल टेम्प्लेट का उपयोग करें
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
Composition is more flexible and avoids inheritance coupling.
व्याख्या (हिन्दी)
संरचना अधिक लचीली है और वंशानुक्रम युग्मन से बचती है।