• About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
  • Disclaimer
EquickLearning - Learn Any Where
EquickLearning - Learn Any Where

Mega_Menu

  • ×
  • Home
  • Windows Server
    • All
    • Server
    • Activity Directory
    • Programming
      • ALL
      • JAVA
      • PHP
      • Installation
        • Windows Server
        • Laravel
        • JDk
        • Software
        • BOOKS
        • Buy Here
        • Pages
          • • About Us
          • • Contact Us
          • • Privacy Policy
          • • Disclaimer
          Search
          HomeJAVATypes of Inheritance in Java in Hindi | How many types of Inheritance in Java

          Types of Inheritance in Java in Hindi | How many types of Inheritance in Java

          byAnuj Dwivedi0 -May 30, 2020
          हैलो दोस्तों 🙏नमस्कार कैसे है आप सभी, मैं आशा करता हूँ की आप सभी अच्छे 😊 ही होंगे | तो दोस्तों मैं अ‍नुज द्विवेदी आज आप सबके के लिये  बहुत ही Important और Inheritance से Related Types of Inheritance in Java के बारे में पोस्ट लेकर आया हूँ |

          Types of Inheritance in Java in Hindi


          OOPs Programming language में Types of Inheritance 5 प्रकार के होते है जो निम्नलिखित प्रकार से है -
          1. Simple Inheritance
          2. Multilevel Inheritance
          3. Hierarchical Inheritance
          4. Multiple Inheritance
          5. Hybrid Inheritance
          लेकिन Java Programming  Language में Types of Inheritance सिर्फ 3 प्रकार के support करते है जो निम्न प्रकार से है
          1. Simple Inheritance
          2. Multilevel Inheritance
          3. Hierarchical Inheritance

          1. Simple Inheritance:-

          इस प्रकार के Inheritance में एक Super class तथा दुसरी Sub class होती है । Super class को Sub class में हम extends keyword का प्रयोग करके inherit करते है । इसका Syntax इस प्रकार है ।
          types-of-inheritance-in-java-in-hindi


          class Superclass{
            // code here
          }
          class Subclass extends Superclass{
             // code here
          }
          

          2. Multilevel Inheritance :-

          जब एक से अधिक class एक level में एक दुसरे को extends करती है तो इसे multilevel Inheritance कहा जाता है इसमें एक sub class किसी दूसरी super class को inherit करता है तथा उस sub class को एक अलग class Inherit करता है जिसके लिये वह दूसरी class super class बन जाता है |


          Types of Inheritance in Java in Hindi
          class A{
            // code here
          }
          class B extends A{
             // code here
          }
          class C extends B{
            // code here
          }
          

          3. Hierarchical Inheritance :-

          जब एक class को एक से अधिक class द्वारा inherit किया जाता है तो उस Inheritance को Hierarchical inheritance कहते है । इसमे एक class की property को एक से अधिक class द्वारा use किया जाता है । इस प्रकार के Inheritance में एक Super class और एक से अधिक sub class होते है । यह multiple Inheritance के विपरीत होता है।


          Types of Inheritance in Java in Hindi
          class A{ 
            // code here
          }
          class B extends A{
             // code here
          }
          class C extends A{
            // code here
          }
          class D extends A{
            // code here
          }
          

          4. Multiple Inheritance :-

          जब एक से अधिक class को एक class द्वारा inherit किया जाता है तो उस inheritance को Multiple Inheritance कहते है । इसमे एक से अधिक class कि property को दूसरी class द्वारा inherit किया जाता है। इसमे एक से अधिक super class और एक Sub class होती है ।

          Java class के साथ Multiple Inheritance को Support नही करती है।

          Note - जावा में interface का use करके multiple inheritance को support करा सकते है ।

          Class के case में यदि दो super class के अंदर एसा method exist करता है जिसकी signature दोनो class में same हो तो class या sub class का object create करके जब हम उस method को call करने कि कोशिश करते है तो compiler error show करता है क्युंकि compiler नही जान पाता कि दोनो किस super class के method को call करना चाहते है तो यहाँ पर ambiguity problem होती है


          Types of Inheritance in Java in Hindi
          class A{
            // code here
          }
          class B{
             // code here
          }
          class C extends A,B{
            // Does not supported in java
          }
          
          
          Types of Inheritance in Java in Hindi
          interface A{ //code here } interface B{ //code here } interface C extends A,B{ // that is supported } 
           

          Final Word

          तो दोस्तों आज मैंने आप को बताया की Types of Inheritance in Java in Hindi | How many types of Inheritance in Java क्या है|

          तो दोस्तों मै आशा करता हूँ की आपको ये Post पसंद आई होगी। अगर आप को ये Post थोड़ी सी भी Useful/Helpful लगी हो Please Follow and Comment जरुर करे और इसे अपने दोस्तों के साथ Share करे! धन्यबाद|
          • Newer

          • Older

          Posted by Anuj Dwivedi

          https://equick-learning.blogspot.com/
          I am Anuj Dwivedi from UP. I am Founder of equicklearning.com . I'm a student of Computer Science and Engineering. I am a full stack developer Currently i'm working on JAVA Based Web Application, Web technology like JSP, SWING, HTML, CSS, JQUERY and also Android App Development.

          You might like

          Show more

          Types of Inheritance in Java in Hindi | How many types of Inheritance in Java

          May 30, 2020

          What is Inheritance in JAVA in Hindi ? | What Inheritance in OOPs Concept ?

          May 25, 2020

          What is Applet in Java in Hindi | Applet Life Cycle in Hindi

          May 14, 2020

          Post a Comment

          You are welcome to share your ideas with us in comments

          Post a Comment

          You are welcome to share your ideas with us in comments

          Follow Us

          • 1.3k
          • 30
          • 190
          • Popular
          • Recents
          • Comments

          Popular

          EquickLearning - How to set Java Environment or Path on Windows 10 in Hindi(विंडोज पर जावा का पाथ कैसे सेट करें हिंदी में )

          December 22, 2019

          Recents

          Havard University Courses and Certification | Top 9 Havard University and Microsoft Courses

          October 19, 2020

          What is Network Topology in Hindi? | How many types of Network Topology?

          October 10, 2020

          What are the different types of Cables in Hindi?

          October 10, 2020

          Comments

          Anonymous

          Very useful contents bro and helpful thank you 👍...

          Anuj Dwivedi

          Thank you

          Sudhanshu Gupta

          Finally Smajh me aaya👏 Vidya me to kuch aur hi La...

          Categories

          • COMPUTER(7)
          • Cryptography(1)
          • DBMS(4)
          • INTERNET(5)
          • JAVA(8)
          • Programming(9)
          • Security(13)
          • Windows_Server(25)
          EquickLearning - Learn Any Where

          About Us

          मैंने इस site को लिखा और develop किया है ताकि students computer science से संबंधित तकनीकों को आसानी से सीख सकें। मैं विभिन्न तकनीकों पर आसान information प्रदान करने के लिए committed हूं। मुझे उम्मीद है कि यह आपकी बहुत मदद करेगा। - Anuj Dwivedi

          DMCA.com Protection Status
          All Right Reserved Copyright © Equicklearning.Com
          • About
          • Contact Us
          • Privacy Policy
          • Terms & Conditions
          • Disclaimer

          Contact Form