Java Tutorials - 44 Method Overloading

preview_player
Показать описание
Two or more methods can share the same name as long as their method signatures are not exactly the same. This is known as method overloading. Sometimes you may need a method to have very similar functionality as another method and while you could technically just give the similar method another name, utilizing method overloading is one more aspect of writing code that adds to the elegance of a program.
Рекомендации по теме