Object Oriented Programming - JAVA- Inheritance
Object Oriented Programming - JAVA👽 In this blog we will discuss about inheritance in java programming. Through this blog, you can get an idea about what is "inheritance", why we use inheritance, how we use inheritance in coding. So, let's start. Inheritance..... The process of relating one class to another is called inheritance. In inheritance we need to know mainly two types of classes. Super class Sub class Superclass is the class that gives its properties and behavior, in other words variables and methods. The superclass is also called the parent class. Subclasses inherit the variables and methods of the superclass. A subclass is also called a child class. Sub class can take all the things of super class but super class cannot take things of sub class. If the super class has private thing, sub class can't get that. Sub classes have new variables and methods that not in super class. Let me give simple example for it. Father has a car. when the inherita...