Hi all
I have a problem.I overloaded a method .In my program i have two methods as
given below
[CODE=java]public Vector getList(String abc){
Vector v = new Vector();
// some database operation i am doing with the string abc and storing in
// the array list // for example purpose i have added aaa,bbb,ccc
v.add("aaa");
v.add("bbb");
v.add("ccc");
return v;
}
public ArrayList getList(String abc){
ArrayList av = new ArrayList();
// some database operation i am doing with the string abc and storing in
// the array list // for example purpose i have added aaa,bbb,ccc
av.add("aaa");
av.add("bbb");
av.add("ccc");
return av;
}[/CODE]
I am getting a error called duplicate method name getList()
Is this type of overloading not possible.
I have a problem.I overloaded a method .In my program i have two methods as
given below
[CODE=java]public Vector getList(String abc){
Vector v = new Vector();
// some database operation i am doing with the string abc and storing in
// the array list // for example purpose i have added aaa,bbb,ccc
v.add("aaa");
v.add("bbb");
v.add("ccc");
return v;
}
public ArrayList getList(String abc){
ArrayList av = new ArrayList();
// some database operation i am doing with the string abc and storing in
// the array list // for example purpose i have added aaa,bbb,ccc
av.add("aaa");
av.add("bbb");
av.add("ccc");
return av;
}[/CODE]
I am getting a error called duplicate method name getList()
Is this type of overloading not possible.
Comment