Constructor

Constructor Constructor is a special type of method that is used to initialize the state of an object. Constructor is invoked at the time of object creation. It constructs the values i.e. data for the object that is why it is known as constructor.Constructor is just like method but it does not have any explicit return type. Rules for creating constructor There are basically two rules defined for the constructor.      1....

Method Overloading in Java

Method Overloading in Java If a class have multiple methods by same name but different parameters, it is known as Method Overloading. If we have to perform only one operation, having the same name of the methods increases the readabilityof the program. Suppose you have to perform addition of the given numbers but there can be any number of arguments, if you write the method such as a(int,int) for two parameters, and b(int,int,int) for three parameters...