But the private methods can be redeclared with the same name and return type and any modifier in subclass. This will not give any compile time or runtime error. Am i right???

Valentin Crettaz

Gold Digger
Sheriff

Posts: 7610

posted 15 years ago

right, but the question excplicitely asks about overriding. If you set the overriding thing aside, then all options are correct, since there are no constraints on which method can be declared within SubClass.