Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to understand the difference (if any) between the two.

According to the Wikipedia page for Multiple Dispatch it is synonymous with Function Overloading, but then later on goes on to say:

In a language with only single dispatch, such as Java […]

which seems like a contradiction, since Java does support function overloading.

So which is it? Is Multiple Dispatch different from Function Overloading, or is the article wrong in claiming that Java does not support Multible Dispatch?

share|improve this question
up vote 14 down vote accepted

Multiple dispatch is not (always) the same as function overloading, although they do bear some similarities. And Java does not support multiple dispatch.

In statically typed languages, including Java, the biggest difference between dispatch and overloading is that overloading is based on the static type of parameters (i.e. the choice of which method is actually called is decided compile-time), while dispatch is based on the dynamic types (i.e. the decision is made runtime). (Such languages usually don't support multiple dispatch.)

But then again, this may be a question of terminology. In dynamically typed languages, dispatch and overloading indeed seem to boil down to the same thing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.