Originally posted by shuaib ahmad:
class sample
{
sample(String s)
{
System.out.println("String");
}
sample(Object o)
{
System.out.println("Object");
}
}
class constructor
{
public static void main(String arg[])
{
sample s1=new sample(null);
}
}
y the answer is String , and y it is not declared as error