نکاتی در مورد Inheritance در جاوا

  • Inheritance is known as getting property of one class to another.
  • in java we can achieve inheritance using the keyword extends.
  • inheritance has 3 types 1-single inheritance 2-multiple inheritance and 3-circular inheritance.
  • no programming language support circular inheritance.
  • Java also doesn't support multiple inheritance.
  • super class object will be created first before the subclass object.
  • super class constructor will get called through the subclass constructor.
  • super class object is available through subclass reference variables.
  • Object class is the super class of all the classes and the object of the Object class will be created first before creation of any other classes.
  • we have reference from subclass to superclass and we don't have reference from super classess to sub classess


نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد