Srinivas Palam wrote:Thanks for your responses. Now I understood.
One more question, as we cannot override final and static methods, Is it applicable to overloading methods also? My answer is Yes, but want to confirm.
do you want to say that we cannot overload final and/or static methods ?
the answer is no we can. we can overload final methods and/or static methods. overloading means same method name but with different number or type of arguments passed. for e.g
public final void SomeMethod(int a , int b) { }
public final
String SomeMethod(int a , int b, int c) { }
public final static String SomeMethod(Animal a ) { }