Posts

Showing posts from August, 2020

Inheritance - Object-oriented programming (Parent-Child)

Image
                                                                                                                             https://www.facebook.com/techaddaa/   Hey Friends,  This is third post in  core java concepts blog. This series is specially designed for beginners to help them in their learning. Introduction -   There are many concepts like Classes, Object,  Polymorphism, Inheritance etc. As concluded in second post, here we will explore important concept called "inheritance" and learn types of  inheritance , it's advantages along with implementation in java language. This concept is simple to understand. Like in real world, every child get few habits from their parent inherently similarly in programming child classes inherit behaviour from parent class. Parent class is also called super class, base class and child class is also called sub class, derived class. This relationship is called as parent-child relationship or IS-A relationship. For example animal class

Polymorphism Part 1 (Compile Time Polymorphism)

Image
                                                                                             https://www.facebook.com/techaddaa/   Hello Friends,  This is second post in  core java concepts blog. This series is specially designed for beginners to help them in their learning. Introduction -   There are many concepts like Classes, Object,  Polymorphism, Inheritance etc. Here we will explore polymorphism and learn types of polymorphism, it s'advantages along with implementation in java language.                           Prerequisite - https://oopsconceptsjava.blogspot.com/2020/08/classobjects.html   Zeal for learning. What is  Polymorphism ? T he dictionary definition of  polymorphism  refers to a principle in biology in which an organism or species can have many different forms or stages. This principle can also be applied to object-oriented programming and languages like the Java. Polymorphism is implemented in two ways - Compile time polymorphism Run time  polymorphism   1. Compil