An interviewer asked me to explain this code. What does it do?
public class Test {
public void methodOne(Object obj) {
System.out.println("Object as Parameter");
}
public void methodOne(String str) {
System.out.println("String as parameter");
}
public static void main(String[] args) {
Test t = new Test();
t.methodOne(new Object());
t.methodOne("");
t.methodOne(null);
}
}