N
N
NosferatuZodd2019-07-09 19:28:18
Java
NosferatuZodd, 2019-07-09 19:28:18

Why can methods in Java 2 have the same name if they have different parameter types?

I just recently started learning Java, and I don't quite understand why two methods in the same class can have the same name, right given the fact that they have different parameters? Haven't seen this in any AP.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-07-09
@dolphin23

This is called overload. In this case, the method overload

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question