मराठी

During inheritance if no visibility mode is declared then the system automatically assumes it to be private. - Computer Applications

Advertisements
Advertisements

प्रश्न

During inheritance if no visibility mode is declared then the system automatically assumes it to be private.

पर्याय

  • True

  • False

MCQ
चूक किंवा बरोबर

उत्तर

This statement is False.

Explanation:

  1. In inheritance (particularly in C++), the default visibility mode is:
    1. Private for class inheritance.
    2. Public for struct inheritance.
  2. However, in Java, no visibility modes such as private, public, or protected are provided during inheritance. The default access behaviour is determined by the class members' access modifiers. In Java, inheritance works by inheriting both public and protected elements. 
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 8: Encapsulation and Inheritance - EXERCISES [पृष्ठ ४४४]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 8 Encapsulation and Inheritance
EXERCISES | Q III. 5. | पृष्ठ ४४४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×