package org.study.algos; public class Study { public static void main(String[] args) { A a = new A(); a.m1(null); } } class A { public v
A String is an Object, an Object is not a String, thus the first overload is more specific than the second. See JLS 15.12.2, as Syntactic mentioned.