Tech

Polymorphism in Java

Just revisiting and explaining myself Polymorphism concept here through a blog post. The words Polymorphism means multiple forms. In Java ,Polymorphism means multiple forms of an object. We shall divide this article into 3 sections. 1.Syntax 2.Calling a variable polymorphically. 3.Calling a method polymorphically. 1.Syntax Now in polymorphism in Java, the thumb key rule to…

Tech

Constructors in Java

Constructors are used every time to initialize instance variables. There are some additional rules associated with constructors that are often asked in interviews.Hence revising those here through a blog post. 1.A constructor is used to initialize instance variables. 2.When an object of an class is created,JVM goes to the class and searches for that matching…