Are we splitting hairs here? Can we say with any degree of certainty whether we are "overriding" a private method, or declaring a new one? for example consider:
class privatebase
{
private void amethod() {
System.out.println("In parent's amethod");
}
}
public class privatedemo extends privatebase
{
private void amethod() {
System.out.println("In child's amethod");
}
public static void main(
String[] args)
{
privatedemo pd = new privatedemo();
pd.amethod();
}
}
This outputs: In child's amethod
Can we say for sure that the amethod() in privatebase was not overridden, and a new one was declared? And for that matter, does it make a difference?