Overloading concept: which function will be called and why?
Class Student {
public void setName(String name){
//Some implementation
}
public void setName(Object name){
// some implementation
}
}
I have a Student class with overloading methods, I just want to know which method will be called and why?
Student s = new Student()
s.setName("abc");
CHANGE Language: JAVA
+3
source to share