A variable obscures a type with the same name if both are in scope. Say, your instance and local variables have the same name.
public class Base {
int a = 5;
public void f() {
int a = 7; //obscuring instance variable a
System.out.println(a);
}
} Test Code obscuring
public class PolymorphismTest {
public static void main(String[] args) {
Base b = new DerivedOne();
b.f(); //prints 7 -- local varible obscures instance variable
}
} So, overriding and overloading are good, but avoid method hiding (i.e., having static methods with the same name in parent/child classes), variable shadowing (i.e., having similar variable names in parent/child classes), and variable obscuring (i.e., having the same variable name for instance, static, and local variables).