Question: Why isn't this allowed and treated as same signature?

```
public Object myMethod(Map<String, String[]> values) {
   return this;
}

public Object myMethod(Map<String, String> values) {
   return this;
}

```

Answer: 
The urban myth answer is:

> 
> Because [type erasure](http://docs.oracle.com/javase/tutorial/java/generics/genTypes.html) causes the generics information to be lost. At runtime, those methods appear identical.
> 
> 
> `Map<X, Y>` becomes just `Map`.
> 
> 
> 

However, the actual answer appears to be more complex. See this [excellent answer](https://stackoverflow.com/a/8467804/474189) from a [duplicate question](https://stackoverflow.com/questions/1998544/method-has-the-same-erasure-as-another-method-in-type). The compiler is actually quite capable of selecting the correct overloaded method given the supplied arguments, however the requirement to support legacy non-generics-aware code has forced the `javac` developers to forbid it.
This is because of [Type Erasure](http://docs.oracle.com/javase/tutorial/java/generics/erasure.html). Type Erasure removes most of the generics information at compile time. So above code after compilation would be

```
public Object myMethod(Map values) {
   return this;
}

public Object myMethod(Map values) {
   return this;
}

```

So both the methods are identical at runtime.