Polymorphism means one name and many duties. Polymorphism refers to the ability of one thing to take many(Poly) distinct forms(Morphism). It is the property by which same message is send to objects of different classes and the objects behave differently. It is a very powerful concept that allows the designingContinue Reading

What is method overloading in Java Method overloading in Java is a programming concept when programmer declares two methods of the same name but with different method signature, e.g. change in the argument list or change in the type of argument. method overloading is a powerful Java programming technique toContinue Reading

Constructor in java is block of code which allows you to create instance of the object. It does not have return type.It has two main points Constructor name should be same as class Constructor should not have any return type else it will be same as method. There are three types ofContinue Reading

this keyword in java is used to refer to current object or instance of class. It can be used in the constructor to call any other overloaded constructor but this keyword should be the first statement in the constructor. This keyword can be used for instance variables this keyword can be used toContinue Reading

super Keyword in java is used to refer the object of the immediate superclass, and it is related to inheritance in java. Let’s say you have an instance variable or method of same name in subclass and superclass. How will JVM know which one are you referring to; superclass or subclass?That’s where you can use super keyword to refer superclass’s variables, methodsContinue Reading

The access modifiers in java define accessibility (scope) of variable, method, constructor or class. There are 4 types of access modifiers in java. Public access modifier Private access modifier Default access modifier Protected access modifier You don’t have to explicitly put the default modifier.JVM will use default modifier if you doContinue Reading

Introduction The word Inheritance is quite familiar with everyone. In common terms, the word means the bequeathing of property and characteristics from generation to generation. For example, the property or characteristics of parents are handed down to their children and the forthcoming generations. Object Oriented Programming (commonly OOP) concepts are based on realContinue Reading

A method is a collection of statements that perform some specific task and return the result to the caller. A method can perform some specific task without returning anything. Methods allow us to reuse the code without retyping the code. In Java, every method must be part of some class which isContinue Reading

Classes and objects are the basic concepts of object-oriented programming. It revolves around the real world entity. In Java, the object is a physical and logical entity, whereas classes are logical entity only. Objects in Java- Objects are real-world entities that have state and behavior. Objects can be physical andContinue Reading

Since the dawn of earth, we have kept on evolving. The need for evaluation comes with the aim of improving the existing systems when something inappropriate is found for the environment. Same is true in the case of programming languages. We need development in programming languages as well. Before discussingContinue Reading