Recursion is the process of a function repeatedly invoking itself. There is no need for a looping statement to be executed in the recursion method. With the help of this technique, complex problems can be reduced to more manageable, simpler ones.
Variable arguments are abbreviated as “varargs.” An argument of a method in Java can take any number of values. Varargs is the name of this argument, which can accept a variable number of values.
When a function is called in Java, a value is passed to the function as an argument. While a parameter is a variable that is used to define a specific value when defining a function.
Method overriding is a term used in Java when a subclass (child class) has a method that is also declared in the parent class. A method used by Java to achieve Run Time Polymorphism is method overriding.
Method overloading is the practice of having multiple methods with the same name but various parameter values. Compile-time polymorphism is connected to overloading.
Method overloading can be done in two different ways.
Different argument datatypes
Various number of arguments