package org.study.algos;
public class Study {
public static void main(String[] args) {
A a = new A();
a.m1(null);
}
}
class A {
public v
null value can be set to reference of any type. All overloaded methods you have are in one inheritance hierarchy Object <- String, the least general one is being choosen. But if you had two overloaded methods that are not in the same hierarchy, then you'd get compilation error about ambigous methods.