Overriding vs. Overloading in Java

Overriding code:

output:

Overloading code:

 

Reference:
http://www.programcreek.com/2009/02/overriding-and-overloading-in-java-with-examples/