Java allows method/operator overloading which means that one can use methods of same names with different implementations. This is useful in programming scenarios. Go through the example below:

Java Code:
int add(int a, int b)
  {
  return (a+b);
  }

double add(double a, double b)
  {
  return (a+b);
  }

float add(float a, float b)
  {
  return (a+b);
  }