what is inheritance in java programming ??
inheritance in java from oops concept that is inherit some one properties in real life suppose you are a son of his own father then you think about their father properties like his home,flat,buildings and many more things so if you are using their father properties why why not any another one uses it
Because you are inherited your father properties with your own born in thier home so in that case in java their are lots of classes in java and if you want to inherit some classes then you simply use
extends keyword in java
e.g class my extends myfather { .........} this means you are inherited your father attributes/fields/properties with your own class and now you can implement both of class
i.e your own and your father ....
No comments:
Post a Comment