Skip to content

Tag Archives: Java-Overloading

Method Overloading: Method Overloading is a Compile time polymorphism. In method overloading, more than one method shares the same method name with different signature in… Read More
How to overload main method in java? Method Overloading can be defined as a feature in which a class can have more than one method… Read More
Predict the output of the program public class GFG {     private GFG(Object o) {         System.out.println("Object");     }     private GFG(double[] d) {         System.out.println("double array");     }     public static… Read More
Prerequisite – Overloading in Java1) What is the output of the following program?   Java public class Test {     public int getData() //getdata() 1     {         return… Read More
Prerequisite: Method Overloading, Autoboxing and Unboxing In Java there are two type of variables: Primitive type and Reference type. Conversion of primitive type to its… Read More
Prerequisite – Constructor, Overloading in java In addition to overloading methods, we can also overload constructors in java. Overloaded constructor is called based upon the… Read More
Prerequisite – Varargs , Method Overloading Method Overloading in Varargs Overloading allows different methods to have same name, but different signatures where signature can differ… Read More
Prerequisite: Overloading Java can distinguish the methods with different method signatures. i.e. the methods can have the same name but with different parameters list (i.e. the… Read More
Overloading allows different methods to have the same name, but different signatures where the signature can differ by the number of input parameters or type… Read More
In Java it is very common to overload methods. Below is an interesting Java program. public class Test {     // Overloaded methods     public void fun(Integer… Read More
Consider the below Java program. // A Java program with overloaded main() import java.io.*;    public class Test {            // Normal main()     public static… Read More