Hi every 1
Please let me know that why the code given below is printing "Sting called". I thought that it should give either compile time error or should print "Object called".
public class Obj
{
public Obj(Object o)
{
System.out.println("Object called");
}
public Obj(
String s)
{
System.out.println("String called");
}
public static void main(String[] args)
{
Obj o = new Obj(null);
}
}