In a previous article Everything About ClassNotFoundException Vs NoClassDefFoundError , I have explained ClassNotFoundException and NoClassDefFoundError in details and also discussed their differences and how to avoid them. If you have not read it, please go ahead and give it a look. Similar to that here in this article, we will look into one more core concept of Java which is method overloading and overriding. As soon as we start learning Java we get introduced to them and their contracts which are pretty simple to understand but sometimes programmers get confused between them or they do not know either it is a correct overload/override because of the different rules. Here we will discuss What is method overloading and overriding, What contract one must follow to correctly overload or override a method, What are the different rules of method overloading and overriding and what are the differences between them. Method Overloading Method overloading means providing t...
Naresh Joshi's blog for Java Language, Spring, Hibernate, Struts, Web Services, Micro Services, Design Patterns, Multi-threading, Collection XML, SQL.