+ 8
[Java] Generic Method vs Method Overloading
What's the difference between Generic and Overloading in java ? When should I use Generic and When should I use Overloading ? https://code.sololearn.com/c55P1PJmAnwl/?ref=app
1 Resposta
+ 8
Generics are used for type safety and to avoid casting, they don't replace overloading which means to define a specific behaviour depending on the arguments.
I think this will help you to understand the differences:
http://docs.oracle.com/javase/tutorial/extra/generics/intro.html