• Post Reply Bookmark Topic Watch Topic
  • New Topic

Method Overloading Examples

 
Dinakar Manchikalapudi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone explain what a method overloading is with the help of a simple example?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dinakar,
Welcome to JavaRanch!

Method overloading is when you have two or more methods with the same name and different arguments. There are many examples in articles on the subject. Do you have a more specific question on this?
 
Dinakar Manchikalapudi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii Jeanne,
Thanks for yr reply. I was looking for some sample code for overloaded methods. Does the overloaded method need to be in the same class?

Thanks,
Dinakar.
 
Mark Spritzler
ranger
Sheriff
Posts: 17290
9
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am moving this to the Java In General (Beginner) forum.

Thanks

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!