Method Overloading in Java
Overloading = same method name in the same class with different parameter lists. Change the number or types: add(int, int) vs add(double, double). The compiler picks the match from the arguments you pass.
Return type alone does not create a valid overload. That is the trap. Overloading is handy for convenience APIs — print with many input shapes.
Interview line — same name, different params, compile-time. Return type alone is not enough.
Let's take this on the board with one tiny Main class — no extra files. Method Overloading in Java — compiler picks the matching add based on argument types. Start from main, go line by line, and stop at each print. That output is the proof for Method Overloading.
Stress: return type alone cannot overload.