Hey Guys, I am creating this blog to share deep knowledge in Java, JSP, Servlets, JDBC, Hibernate, Spring and Spring MVC in details.

What is method overloading in Java?

What is method overloading in Java?
i) Overloaded methods are bonded using static binding in Java. Which occurs during compile time i.e. when you compile the Java program. During the compilation process, the compiler bind method calls to the actual method.
ii) Overloaded methods are fast because they are bonded during compile time and no check or binding is required during runtime.
iii) A most important rule of method overloading in Java is that two overloaded methods must have a different signature.
a) A most important rule of method overloading in Java is that two overloaded methods must have a different signature.
b) Type of argument to a method is also part of the method signature.
c) Order of argument also forms part of the method signature provided they are of a different type.
c) The return type of method is not part of the method signature in Java.

Share:

Related Posts:

No comments:

Post a Comment

Popular Posts