Technology Guruu

  • Home
  • Site Info
    • About Us
    • Disclaimer
    • Privacy Polacy
  • Home
  • Digital Marketing
    • SEO
    • SMM
    • SEM
  • Quotes
  • Technical
  • Java
  • .Net
    • C#.Net
    • ASP.Net
  • Keychains

Saturday, 24 September 2016

Best Description for Inheritance in c#.net and Java

 Akansha     18:00:00     TechnicalQuestions     No comments   

OOPS Principles are abstraction,inheritance,polymorphism these are basic points for oops.Inheritance is the most important and extraordinary topic.We are Providing Basic Information about Inheritance and also give datailed explanation about Types of Inheritance.

Brief Description About Inheritance

inheritance
Inheritance Real Time Example

Introduction about Inheritance

  • Inheritance is nothing but deriving (or)inheriting the members from one class to another class.
  • A class which is giving the members is called as super class (or) parent class(or) base class
  • A class which is retrieving the numbers is called as sub class (or)derived class (or) child class
  • Because of inheritance sub class can access super class members as well as using sub class objects we can access super class members.
  • Because of inheritance super class cannot access subclass members as well as using super class object we cannot access subclass members.

Types Of Inheritance

typesofinheritance
Types Of Inheritance

1.Single level inheritance
2.Multilevel inheritance
3.Multipel inheritance
4.Hybrid inheritance
5.Hierarical inheritance

1.Single Level Inheritance

Inheriting from one class to another class is called Single inheritance
Syntax:
class C1
{
}
class C2:C1
{
}

2.Muli Level Inheritance

Inheriting fromone class to another class,from that class to some other class is called is called as Multilevel inheritance.
Syntax:
class C1
{
}
class C2:C1
{
}
class C3:C2
{
}

3.Multiple Inheritance

inherting multiple classes into single class is called as multiple inheritance.
Syntax:
class C1
{
}
class C2
{
}
class C3:C2,C1
{
}

4.Hybrid Inheritance

A combination of two inheritance is nothing but Hybrid inheritance

5.Hierarical Inheritance

Inheritating single class into multiple classes is called as Hierarichal inheritance
Syntax:
class C1
{
}
class C2:C1
{
}
class C3:C1
{
}

Advantages Of Inheritance

Code Reusability
Reusability
Because of inheritance a method which is defined in the super class can be accessed by derived classes by derived classes.That means here we are achieving code reusability with inheritance.
Friends You Like My Post Please Share in Facebook,Twitter,Google+.You Feel Free Comment On My Post.
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Popular Posts

  • Brief description about Delegates
    Introduction about delegates and why delegates are came the main purpose of delegates how to useful and what are the advantages and disadv...
  • Missing My Friend Quotes : Friendship Day Quotes 2017
    Friends today my article about missing friends and moments with them. Here you are seen the best friendship quotes and some  feelings when...
  • Na Tanu Samjhawan Ki Song lyrics
    Na Tanu Samjhawan Ki Song Lyrics With English Translation Movie : Humpty Sharma ki Dulhaniya Song : Samjhawan Song Singer : Arijit ...
  • Detail Introduction about C#.Net
    Brief Introduction about C#.Net  Introduction C#.Net is the one of the Programming Language the .Net Framework also contains ano...
  • Love Failure Quotes and Sad valentines day Quotes
    We Love Someone is a easy process sometime takes long time to love someone love others within short period but anyway always love dependin...
  • Top 10 valentine's day Quotes and Greetings wishes
    All Lovers have Anxiety in Valentines day because it is a festival to all lovers in these they enjoy a lot and celebrate the Valentine...
  • Wonderful sayings about Life.
    I Believe Follow  Things(Life Quotes) I Believe I believe: ********** Believe in Life ********** That we don't have to chan...
  • Brief Description about Multicast Delegate
    Multicast delegate is an extension of normal delegate. It helps you to point more than one method at a single moment of time. Multicast ...
  • Letter B wallpapers and keychains for facebook
    In these we are Providing Letter B Wallpapers and awesome Key chains also Some Facebook Profile Pictures and cover photos also we are prov...
  • Best Good Afternoon wishes greetings and quotes
    Top Most Good Afternoon Wishes Good Afternoon wishes are gives a relaxation in afternoon time.This wishing can be done between 12 to 3 p...

Categories

  • Entertainment (67)
  • TechnicalQuestions (58)
  • Quotes (11)
  • C#.Net (8)
  • Java (8)
  • ValentinesDay (4)
  • SEO (3)
  • Home
  • About Us
  • Disclaimer
  • Privacy Policy
  • Sitemap

Copyright © 2015-2017 Good Friends 5.All Rights Reserved• And Our Sitemap • All Logos and Trademark Belongs To Their Respective Owners•