This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The overloaded method which has smallest argument having width that is enough for the calling parameter (if the argument type is primitive) or the refernce type down in the inheritance tree which fits the calling parameter,is a right candidate for this overloaded method invocation.Hence the method m(ArrayList a) will be called.
LinkedList and ArrayList are the implementation of same interface so they are sibling (which can not be checked by the compiler,I guess),not sub-class /super-class.So when the compiler sees such type of code it feels the amiguity for not having the answer for the question "which one to invoke,both are eligible?",so stops compilation.