This could be just semantics and may be a stupid question, but I'm curious if the following would be considered overloading:
public String name = "name";
public void printName() {
System.out.println(name);
}
protected String printName(String extra) {
System.out.println(name + extra);
return name + extra;
}
Everything I've read says that parameters must be changed for overloading to occur, and that changing access modifiers and return types won't result in a compilation error so long as the parameters are different, but I can't figure out whether the latter would still be considered overloading.