Originally posted by Sanjay Gurav:
Hi,
Classs AA{
public void sample(String s)
{
System.out.println("String");
}
public void sample(object s)
{
System.out.println("Object");
}
}
Class BB{
public void static main(String str[])
{
AA a=new AA;
a.sample(null);
}
}
What will be the output if we compile and run please explain me.
Thnx,
Sanjay :roll:
Well there are a lot of typos...
Anyways also use code tags to diplay code snippets.
Anyways I am correcting your code:
Save it with BB.java and then compile it and try to run it... and also for the output check the follwoing link....
Choose the Most Specific Method Hope it helps you out..