Ques: Which method will be called and y?
Posted
by Gaurav
on Stack Overflow
See other posts from Stack Overflow
or by Gaurav
Published on 2010-05-20T18:18:59Z
Indexed on
2010/05/20
18:20 UTC
Read the original article
Hit count: 173
java
Ques: Which method will be called and y?
public class Test {
public void method(Object o){ System.out.println("object"); }
public void method(String s) { System.out.println("String"); }
public void method() { System.out.println("blank"); }
/** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Test test=new Test(); test.method(null);
}
}
© Stack Overflow or respective owner