FliQi Education App Download
प्रश्न-बैंक · Programmer Java

OOPs Concepts - Data Hiding(Abstraction and Encapsulation) — प्रश्न और उत्तर

Programmer Java · 67 जाँचे हुए (verified) प्रश्न

  • 67 जाँचे हुए प्रश्न
  • हिंदी + English

पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 20 के उत्तर और हल FliQi Question Bank app में।

भाषा
प्रश्न 1उत्तर + हल
Java की कौन-सी सुविधा किसी class को अपने गुणों (attributes) और method पर पूरा नियंत्रण देती है, जिससे encapsulation लागू होता है?
Which Java feature allows a class to have total control over its attributes and methods, enforcing encapsulation?
  1. Aइनहेरिटेंस (Inheritance)Inheritance
  2. Bपॉलीमॉर्फ़िज़्म (Polymorphism)Polymorphism
  3. Cएक्सेस मॉडिफ़ायर (Access modifiers)Access modifiers
  4. Dएक्सेसर और म्यूटेटर method (Accessor and mutator methods)Accessor and mutator methods

सही उत्तर / Answer: (C)

हल / Solution
access modifier यानी private, default, protected और public तय करते हैं कि class का कौन-सा गुण या method कहाँ से दिख सकता है। इन्हीं से class अपने गुणों और method, दोनों पर पूरा नियंत्रण रखती है। getter-setter भी मदद करते हैं, पर वे सिर्फ़ गुणों तक पहुँच देते हैं। वे भी तभी काम आते हैं जब गुण private हों, यानी वे भी access modifier पर टिके हैं। inheritance और polymorphism का पहुँच-नियंत्रण से सीधा संबंध नहीं है।
Access modifiers, namely private, default, protected and public, decide where each attribute or method of a class can be seen. With them, a class controls both its attributes and its methods. Getters and setters help too, but they only cover attributes, and they work only because the attributes are made private by an access modifier. Inheritance and polymorphism are not directly about access control. So option 3 is correct.
प्रश्न 2उत्तर + हल
निम्नलिखित में से कौन-सा encapsulation का लाभ नहीं है?
Which of the following is NOT an advantage of encapsulation?
  1. Aयह संवेदनशील डेटा तक अनधिकृत पहुँच रोककर सुरक्षा बढ़ाता है।It enhances security by preventing unauthorized access to sensitive data.
  2. Bयह implementation का ब्योरा छिपाकर रखरखाव आसान बनाता है, जिससे प्रोग्राम के दूसरे हिस्सों पर असर डाले बिना बदलाव किए जा सकते हैं।It improves maintainability by hiding implementation details, allowing changes to be made without affecting other parts of the program.
  3. Cयह मौजूदा class को उपयोग करना और आगे बढ़ाना आसान बनाकर पुनः उपयोग (reusability) को बढ़ावा देता है।It promotes reusability by making it easier to use and extend existing classes.
  4. Dयह object के अंदरूनी ब्योरे बाहरी class के सामने खोलकर जटिलता बढ़ाता है।It increases complexity by exposing internal details of objects to external classes.

सही उत्तर / Answer: (D)

हल / Solution
encapsulation के मुख्य लाभ हैं: private डेटा से सुरक्षा, छिपे हुए implementation से आसान रखरखाव, और साफ़ public interface से पुनः उपयोग। इसलिए पहले तीन विकल्प सच्चे लाभ हैं। चौथा विकल्प कहता है कि यह अंदरूनी ब्योरे खोलकर जटिलता बढ़ाता है। यह encapsulation का काम नहीं, उसका उलटा है। encapsulation ब्योरे छिपाता है और जटिलता घटाता है। इसलिए 'लाभ नहीं' वाला सही उत्तर चौथा विकल्प है।
The main benefits of encapsulation are security through private data, easier maintenance because the implementation is hidden, and reusability through a clean public interface. So the first three options are real benefits. Option 4 says it increases complexity by exposing internal details. That is the opposite of what encapsulation does, because it hides details and lowers complexity. So option 4 is the correct answer to this NOT question.
प्रश्न 3उत्तर + हल
Java में encapsulation के लिए, जो method class के बाहर से उपयोग के लिए बने हों, उन पर कौन-सा access modifier लगाना चाहिए?
In Java, which access modifier should be used for methods that are intended to be accessible from outside the class to achieve encapsulation?
  1. Aprivate
  2. Bpublic
  3. Cprotected
  4. Ddefault

सही उत्तर / Answer: (B)

हल / Solution
encapsulation में fields private रखे जाते हैं, पर उन तक पहुँचने वाले getter-setter जैसे method बाहर से बुलाए जाने चाहिए। कोई भी दूसरी class, किसी भी package से, इन्हें तभी बुला सकती है जब ये public हों। private method सिर्फ़ उसी class में दिखता है। protected सिर्फ़ उसी package और subclass तक सीमित है। default यानी बिना modifier वाला method सिर्फ़ उसी package में दिखता है। इसलिए सही उत्तर public है।
In encapsulation, fields are private, but methods such as getters and setters must be callable from outside. Any class in any package can call them only if they are public. A private method is visible only inside its own class. A protected method is limited to the same package and subclasses. A default method, with no modifier, is visible only inside its own package. So the correct answer is public.
प्रश्न 4उत्तर + हल
निम्नलिखित में से कौन-सी encapsulation की एक विशेषता है?
Which of the following is a characteristic of encapsulation?
  1. Aयह class के बाहर से object के सभी गुणों तक सीधी पहुँच देता है।It allows direct access to all attributes of an object from outside the class.
  2. Bयह प्रोग्राम के अलग-अलग हिस्सों के बीच loose coupling (ढीले जुड़ाव) को बढ़ावा देता है।It promotes loose coupling between different parts of a program.
  3. Cयह global variables के उपयोग को बढ़ावा देता है।It encourages the use of global variables.
  4. Dइसमें object के सारे अंदरूनी implementation ब्योरे खोल दिए जाते हैं।It involves exposing all internal implementation details of an object.

सही उत्तर / Answer: (B)

हल / Solution
encapsulation में हर class अपना डेटा private रखती है और बाहर सिर्फ़ public method देती है। दूसरी class इन्हीं method पर निर्भर रहती हैं, अंदर के ब्योरे पर नहीं। इसलिए एक class का अंदरूनी कोड बदलने पर बाक़ी हिस्से नहीं टूटते। इसे loose coupling कहते हैं। सीधी पहुँच देना और सारे ब्योरे खोल देना encapsulation का उलटा है। global variables डेटा को सबके लिए खोल देते हैं, इसलिए वे भी इसके ख़िलाफ़ हैं।
In encapsulation, each class keeps its data private and offers only public methods. Other classes depend on these methods, not on the inner details, so changing one class's internal code does not break the rest of the program. This is called loose coupling. Direct access to all attributes and exposing all internal details are the opposite of encapsulation. Global variables open data to everyone, so they work against it too.
प्रश्न 5उत्तर + हल
encapsulation में डेटा छिपाने (data hiding) की अवधारणा को निम्नलिखित में से कौन-सा कथन सबसे अच्छी तरह बताता है?
Which of the following statements best describes the concept of data hiding in encapsulation?
  1. Adata hiding का मतलब है object का सारा अंदरूनी डेटा बाहरी class के सामने खोल देना।Data hiding refers to the process of exposing all internal data of an object to external classes.
  2. Bdata hiding का मतलब है class के कुछ डेटा तक पहुँच सीमित करना, ताकि सिर्फ़ अधिकृत method ही उसे पढ़ या बदल सकें।Data hiding refers to the process of restricting access to certain data within a class, allowing only authorized methods to access or modify it.
  3. Cdata hiding का मतलब है class के सभी गुण public करना, ताकि बाहर से आसानी से पहुँच हो।Data hiding refers to the process of making all attributes of a class public for easy access from outside the class.
  4. Ddata hiding का मतलब है class के सभी गुण private करना, ताकि बाहर से कोई भी पहुँच न हो सके।Data hiding refers to the process of declaring all attributes of a class as private, preventing any access from outside the class.

सही उत्तर / Answer: (B)

हल / Solution
data hiding में डेटा पर पूरा ताला नहीं लगाया जाता, बल्कि उस तक पहुँचने का रास्ता तय किया जाता है। डेटा private रहता है और सिर्फ़ class के अपने अधिकृत method उसे पढ़ते या बदलते हैं। इसलिए दूसरा कथन सही है। पहला और तीसरा कथन डेटा खोल देते हैं, जो इसका उलटा है। चौथा कथन कहता है कि कोई भी पहुँच न हो। पर getter-setter से नियंत्रित पहुँच मिलती है, इसलिए वह भी ग़लत है।
Data hiding does not lock data away completely; it controls the path to it. The data stays private, and only the class's own authorized methods read or change it. So statement 2 is correct. Statements 1 and 3 expose the data, which is the opposite of hiding. Statement 4 says no access at all is possible, but getters and setters still give controlled access, so it is also wrong.
प्रश्न 6उत्तर + हल
यदि आप encapsulation को दरकिनार करके किसी object के गुणों (attributes) को सीधे पढ़ें या बदलें, तो क्या होता है?
What happens if you bypass encapsulation and directly access or modify attributes of an object?
  1. Aयह encapsulation के सिद्धांतों को तोड़ता है और अनचाहा व्यवहार पैदा कर सकता है।It violates encapsulation principles and can lead to unexpected behavior.
  2. Bयह प्रोग्राम की सुरक्षा बढ़ाता है।It enhances the security of the program.
  3. Cयह debugging की प्रक्रिया को आसान बनाता है।It simplifies the debugging process.
  4. Dयह प्रोग्राम का प्रदर्शन (performance) सुधारता है।It improves the performance of the program.

सही उत्तर / Answer: (A)

हल / Solution
encapsulation में गुणों को सिर्फ़ method से बदला जाता है, ताकि हर बदलाव की जाँच हो सके। अगर कोई कोड सीधे गुण बदल दे, तो ये जाँचें छूट जाती हैं। जैसे खाते का balance ऋणात्मक हो सकता है। इससे object की स्थिति बिगड़ती है और अनचाहा व्यवहार होता है। सुरक्षा बढ़ती नहीं, घटती है। ग़लती कहाँ से आई, यह ढूँढ़ना भी कठिन होता है। प्रदर्शन में मिलने वाला फ़र्क़ न के बराबर होता है।
In encapsulation, attributes are changed only through methods, so every change can be checked. If code changes an attribute directly, these checks are skipped. For example, an account balance could become negative. This breaks the object's state and causes unexpected behavior. Security gets weaker, not stronger. Finding the source of a bug also becomes harder, and any performance gain is negligible. So option 1 is correct.
प्रश्न 7उत्तर + हल
निम्नलिखित में से कौन-सा Java में encapsulation का हिस्सा नहीं है?
Which of the following is NOT a part of encapsulation in Java?
  1. Aएक्सेसर method (Accessor methods)Accessor methods
  2. Bम्यूटेटर method (Mutator methods)Mutator methods
  3. Cक्लास इनहेरिटेंस (Class inheritance)Class inheritance
  4. Dprivate गुण (Private attributes)Private attributes

सही उत्तर / Answer: (C)

हल / Solution
encapsulation के तीन मुख्य हिस्से हैं। पहला, private गुण, जिससे डेटा छिपता है। दूसरा, accessor यानी getter method, जिनसे मान पढ़ा जाता है। तीसरा, mutator यानी setter method, जिनसे मान नियंत्रित ढंग से बदला जाता है। class inheritance एक अलग OOP सिद्धांत है। इसमें एक class दूसरी class के गुण और method विरासत में लेती है। यह encapsulation का हिस्सा नहीं है, इसलिए सही उत्तर तीसरा विकल्प है।
Encapsulation has three main parts. Private attributes hide the data. Accessor methods, or getters, let outside code read values. Mutator methods, or setters, let values change in a controlled way. Class inheritance is a separate OOP principle in which one class receives the attributes and methods of another class. It is not a part of encapsulation, so option 3 is the correct answer to this NOT question.
प्रश्न 8उत्तर + हल
encapsulation में गुणों (attributes) को private घोषित करने की सलाह क्यों दी जाती है?
In encapsulation, why is it recommended to declare attributes as private?
  1. Aclass के बाहर से सीधी पहुँच देने के लिए।To allow direct access from outside the class.
  2. Bडेटा छिपाने (data hiding) को बढ़ावा देने और class के बाहर से सीधे बदलाव रोकने के लिए।To promote data hiding and prevent direct manipulation from outside the class.
  3. Csubclass में गुणों की विरासत (inheritance) पक्की करने के लिए।To enforce inheritance of attributes to subclasses.
  4. Dगुणों की दृश्यता (visibility) बढ़ाने के लिए।To increase the visibility of attributes.

सही उत्तर / Answer: (B)

हल / Solution
private field को सिर्फ़ उसी class के अंदर से पढ़ा या बदला जा सकता है। बाहर का कोड उसे सीधे नहीं छू सकता। उसे getter या setter method से होकर जाना पड़ता है, जहाँ जाँच लगाई जा सकती है। इससे डेटा छिपा रहता है और ग़लत बदलाव रुकते हैं। पहला और चौथा विकल्प private का उलटा असर बताते हैं। private सदस्य subclass को सीधे मिलते भी नहीं, इसलिए तीसरा विकल्प भी ग़लत है।
A private field can be read or changed only inside its own class. Outside code cannot touch it directly and must go through getter or setter methods, where checks can be added. This keeps the data hidden and blocks wrong changes. Options 1 and 4 describe the opposite effect of private. Private members are not even directly accessible in subclasses, so option 3 is also wrong. Hence option 2 is correct.
प्रश्न 9उत्तर + हल
Java में encapsulation कैसे प्राप्त किया जाता है?
In Java, how is encapsulation achieved?
  1. Aसभी गुणों (attributes) को public घोषित करके।By declaring all attributes as public.
  2. Bobject की स्थिति पढ़ने और बदलने के लिए public setter और getter method देकर।By providing public setter and getter methods to access and modify the state of an object.
  3. Cसभी गुणों के लिए protected access modifier लगाकर।By using the protected access modifier for all attributes.
  4. Dसभी method के लिए static keyword लगाकर।By using the static keyword for all methods.

सही उत्तर / Answer: (B)

हल / Solution
Java में encapsulation दो क़दमों में होता है। पहला, fields को private रखा जाता है। दूसरा, उन्हें पढ़ने और बदलने के लिए public getter और setter method दिए जाते हैं। setter में जाँच लगाकर ग़लत मान रोका जा सकता है। विकल्पों में सिर्फ़ दूसरा इसी तरीके को बताता है। सब कुछ public करना डेटा को खोल देता है। protected से subclass और package को सीधी पहुँच मिलती है। static का encapsulation से कोई संबंध नहीं है।
Encapsulation in Java is done in two steps. First, fields are declared private. Second, public getter and setter methods are provided to read and change them, and a setter can reject bad values. Among the options, only option 2 describes this approach. Making attributes public exposes the data. Protected still gives direct access to subclasses and the package. The static keyword has nothing to do with encapsulation.
प्रश्न 10उत्तर + हल
encapsulation के बारे में निम्नलिखित में से कौन-सा कथन सही है?
Which of the following is true regarding encapsulation?
  1. Aencapsulation class के बाहर से object की अंदरूनी स्थिति (state) तक सीधी पहुँच देता है।Encapsulation allows direct access to the internal state of an object from outside the class.
  2. Bencapsulation डेटा छिपाने (data hiding) को बढ़ावा देता है और प्रोग्राम के अलग-अलग हिस्सों के बीच coupling घटाता है।Encapsulation promotes data hiding and reduces coupling between different parts of a program.
  3. Cencapsulation class के सभी गुण और method public बना देता है।Encapsulation makes all attributes and methods of a class publicly accessible.
  4. Dencapsulation केवल static method और गुणों पर लागू होता है।Encapsulation is only applicable to static methods and attributes.

सही उत्तर / Answer: (B)

हल / Solution
encapsulation में fields को private रखा जाता है और उन तक पहुँच सिर्फ़ method के ज़रिए होती है। इससे डेटा छिपा रहता है। दूसरी class सिर्फ़ public method पर निर्भर रहती हैं, अंदर की बनावट पर नहीं। इसलिए हिस्सों के बीच coupling (आपसी निर्भरता) घटती है। सीधी पहुँच देना या सब कुछ public करना encapsulation का उलटा है। यह सिद्धांत हर तरह के field और method पर लागू होता है, सिर्फ़ static पर नहीं।
In encapsulation, fields are kept private and are reached only through methods, so the data stays hidden. Other classes depend only on the public methods, not on the inner structure, which reduces coupling between parts of the program. Giving direct access to internal state or making everything public is the opposite of encapsulation. The idea applies to all fields and methods, not only static ones. So option 2 is correct.
आगे के 20 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति
App खोलिए
प्रश्न 11उत्तर app में
Java में encapsulation क्या है?
What is encapsulation in Java?
  1. Aparent class से गुण और method विरासत में लेने की क्षमता।The ability to inherit attributes and methods from a parent class.
  2. Bobject के अंदरूनी implementation का ब्योरा छिपाकर सिर्फ़ ज़रूरी काम बाहर दिखाने की प्रक्रिया।The process of hiding the internal implementation details of an object and only exposing necessary functionality.
  3. Cएक ही नाम पर अलग-अलग काम वाले कई method बनाने की प्रक्रिया।The process of defining multiple methods with the same name but different implementations.
  4. Dएक class के कई object (instance) बनाने की प्रक्रिया।The process of creating multiple instances of a class.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 12उत्तर app में
Java में एब्स्ट्रैक्शन के उद्देश्य को निम्नलिखित में से कौन-सा सबसे अच्छी तरह बताता है?
Which of the following best describes the purpose of abstraction in Java?
  1. Aप्रोग्राम की जटिलता बढ़ाना।To increase program complexity.
  2. Bobject के implementation का ब्योरा छिपाकर सिर्फ़ ज़रूरी गुण दिखाना।To hide the implementation details and only show the necessary features of an object.
  3. Cएक ही नाम पर अलग-अलग काम वाले कई method बनाना।To define multiple methods with the same name but different implementations.
  4. Dप्रोग्राम को छोटी, सँभालने लायक इकाइयों में तोड़ना।To break down a program into smaller, manageable units.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 13उत्तर app में
Java में abstract method के बारे में निम्नलिखित में से कौन-सा कथन सही है?
In Java, which of the following statements about abstract methods is true?
  1. Aabstract method में method body होनी ही चाहिए।An abstract method must have a method body.
  2. Babstract method को subclass में override नहीं किया जा सकता।An abstract method cannot be overridden in subclasses.
  3. Cabstract method केवल non-abstract class में परिभाषित हो सकता है।An abstract method can only be defined in non-abstract classes.
  4. Dabstract method को concrete subclass में लागू (implement) करना ज़रूरी है।An abstract method must be implemented by concrete subclasses.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 14उत्तर app में
क्या Java में एक interface दूसरे interface को extend कर सकता है?
Can an interface extend another interface in Java?
  1. Aहाँ, extends keyword से।Yes, using the extends keyword.
  2. Bनहीं, interface दूसरे interface को extend नहीं कर सकते।No, interfaces cannot extend other interfaces.
  3. Cहाँ, implements keyword से।Yes, using the implements keyword.
  4. Dनहीं, interface में inheritance का संबंध नहीं हो सकता।No, interfaces cannot have inheritance relationships.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 16उत्तर app में
यदि किसी abstract class की non-abstract subclass अपनी superclass के सभी abstract method लागू (implement) नहीं करती, तो क्या होता है?
What happens if a non-abstract subclass of an abstract class does not implement all the abstract methods of its superclass?
  1. Asubclass में compilation error आएगी।The subclass will have a compilation error.
  2. Bsubclass अपनी superclass से abstract method विरासत में ले लेगी।The subclass will inherit the abstract methods from its superclass.
  3. Csubclass में runtime error आएगी।The subclass will have a runtime error.
  4. Dsubclass अपने आप abstract class बन जाएगी।The subclass will automatically become an abstract class.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 17उत्तर app में
क्या Java में abstract class में constructor हो सकते हैं?
Can an abstract class have constructors in Java?
  1. Aहाँ, पर केवल default constructor।Yes, but only default constructors.
  2. Bहाँ, पर केवल parameterized constructor।Yes, but only parameterized constructors.
  3. Cनहीं, abstract class में constructor नहीं हो सकते।No, abstract classes cannot have constructors.
  4. Dहाँ, default और parameterized दोनों तरह के constructor।Yes, both default and parameterized constructors.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 18उत्तर app में
Java में abstract class के बारे में निम्नलिखित में से कौन-सा कथन सही है?
Which of the following statements about abstract classes in Java is true?
  1. Aabstract class का object (instance) बनाया जा सकता है।An abstract class can be instantiated.
  2. Babstract class में concrete (पूरे कोड वाले) method हो सकते हैं।An abstract class can have concrete methods.
  3. Cabstract class में abstract method नहीं हो सकते।An abstract class cannot have abstract methods.
  4. Dabstract class को अपने सभी method लागू (implement) करने ही पड़ते हैं।An abstract class must implement all its methods.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 19उत्तर app में
Java में एब्स्ट्रैक्शन (abstraction) क्या है?
What is abstraction in Java?
  1. Aएक ही नाम पर अलग-अलग काम वाले कई method बनाने की प्रक्रिया।The process of defining multiple methods with the same name but different implementations.
  2. Bकिसी object के implementation का ब्योरा छिपाकर सिर्फ़ ज़रूरी गुण दिखाने की प्रक्रिया।The process of hiding the implementation details and showing only essential features of an object.
  3. Cप्रोग्राम को छोटी, सँभालने लायक इकाइयों में तोड़ने की प्रक्रिया।The process of breaking down a program into smaller, manageable units.
  4. Dक्लास से object बनाने की प्रक्रिया।The process of creating objects from classes.
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 20उत्तर app में
उच्च स्तर के एब्स्ट्रैक्शन का उपयोग करने से __________
Using higher degree of abstraction __________
  1. Aअसुरक्षित हो सकता हैMay get unsafe
  2. Bपठनीयता (readability) घट सकती हैMay reduce readability
  3. Cअधिक सुरक्षित हो सकता हैCan be safer
  4. Dकमज़ोरी (vulnerability) बढ़ सकती हैCan increase vulnerability
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 21उत्तर app में
एक फ़ोन कई घटकों से बना होता है, जैसे मदरबोर्ड, कैमरा, सेंसर आदि। यदि प्रोसेसर फ़ोन के सभी कामकाज का प्रतिनिधित्व करता है, डिस्प्ले केवल डिस्प्ले दिखाता है, और फ़ोन को संपूर्ण रूप में दर्शाया जाता है, तो निम्नलिखित में से किसमें एब्स्ट्रैक्शन का स्तर उच्चतम है?
A phone is made up of many components like motherboard, camera, sensors etc. If the processor represents all the functioning of the phone, the display shows the display only, and the phone is represented as a whole, which among the following has the highest level of abstraction?
  1. Aमदरबोर्ड (Motherboard)Motherboard
  2. Bडिस्प्ले (Display)Display
  3. Cकैमरा (Camera)Camera
  4. Dफ़ोन (Phone)Phone
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 22उत्तर app में
स्ट्रीम और फ़ाइलों के संदर्भ में ____________
In terms of stream and files ____________
  1. Aएब्स्ट्रैक्शन को स्ट्रीम और डिवाइस को फ़ाइल कहा जाता हैAbstraction is called a stream and device is called a file
  2. Bएब्स्ट्रैक्शन को फ़ाइल और डिवाइस को स्ट्रीम कहा जाता हैAbstraction is called a file and device is called a stream
  3. Cएब्स्ट्रैक्शन को फ़ाइल और स्ट्रीम दोनों कहा जा सकता हैAbstraction can be called both file and stream
  4. Dएब्स्ट्रैक्शन को फ़ाइल और स्ट्रीम के संदर्भ में परिभाषित नहीं किया जा सकताAbstraction can't be defined in terms of files and stream
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 23उत्तर app में
एब्स्ट्रैक्शन प्रिंसिपल में ___________ शामिल है।
Abstraction principle includes___________
  1. Aएब्स्ट्रैक्शन का कम से कम उपयोग करेंUse abstraction at its minimum
  2. Bलंबे कोड से बचने के लिए एब्स्ट्रैक्शन का उपयोग करेंUse abstraction to avoid longer codes
  3. Cदोहराव (duplication) से बचने के लिए जहाँ भी संभव हो एब्स्ट्रैक्शन का उपयोग करेंUse abstraction whenever possible to avoid duplication
  4. DOOP पाने के लिए जहाँ भी संभव हो एब्स्ट्रैक्शन का उपयोग करेंUse abstraction whenever possible to achieve OOP
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 24उत्तर app में
एब्स्ट्रैक्शन ____________ पर लागू हो सकता है।
Abstraction can apply to ____________
  1. Aनियंत्रण (control) और डेटा दोनोंControl and data
  2. Bकेवल डेटाOnly data
  3. Cकेवल नियंत्रण (control)Only control
  4. Dक्लासClasses
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 27उत्तर app में
कार्यान्वयन की जटिलता छिपाने से क्या होता है?
Hiding the implementation complexity can ____________
  1. Aप्रोग्रामिंग आसान बना देता हैMake the programming easy
  2. Bप्रोग्रामिंग जटिल बना देता हैMake the programming complex
  3. Cज़्यादा सुविधाएँ दे देता हैProvide more number of features
  4. Dबेहतर सुविधाएँ दे देता हैProvide better features
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 28उत्तर app में
encapsulation का उपयोग करके कौन सी विशेषता लागू की जा सकती है?
Which feature can be implemented using encapsulation?
  1. Aपॉलीमॉर्फिज़्मPolymorphism
  2. BओवरलोडिंगOverloading
  3. CइनहेरिटेंसInheritance
  4. Dएब्स्ट्रैक्शनAbstraction
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 29उत्तर app में
encapsulation और abstraction में अंतर किस रूप में है?
Encapsulation and abstraction differ as ____________
  1. Aक्रमशः छिपाना और छिपानाHiding and hiding respectively
  2. Bक्रमशः बाँधना और छिपानाBinding and Hiding respectively
  3. Cक्रमशः छिपाना और बाँधनाHiding and Binding respectively
  4. Dइन्हें किसी भी तरह इस्तेमाल किया जा सकता हैCan be used any way
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 30उत्तर app में
OOP में encapsulation क्या है?
What is encapsulation in OOP?
  1. Aयह कई data members और उन पर काम करने वाली member functions को एक इकाई में जोड़ने का तरीक़ा हैIt is a way of combining various data members and member functions that operate on those data members into a single unit
  2. Bयह data members और member functions को एक इकाई में जोड़ने का तरीक़ा है, जो किसी भी डेटा पर काम कर सकती हैIt is a way of combining various data members and member functions into a single unit which can operate on any data
  3. Cयह कई data members को एक इकाई में जोड़ने का तरीक़ा हैIt is a way of combining various data members into a single unit
  4. Dयह कई member functions को एक इकाई में जोड़ने का तरीक़ा हैIt is a way of combining various member functions into a single unit
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
OOPs Concepts - Data Hiding(Abstraction and Encapsulation) के सभी 67 प्रश्न — उत्तर, हल और अभ्यास

FliQi Question Bank app में topic-वार अभ्यास, कठिनाई-स्तर और आपकी प्रगति।

  • पहला test मुफ़्त
  • हिंदी + English
  • जाँचे हुए उत्तर और हल

यह topic किन परीक्षाओं में आता है

Programmer Java के दूसरे topics

सभी topics