Can parent and child class in Java have same instance variable ?
Consider this class:

class parent {
 int a;
}

class child extends parent {
 int a; // should this not give compilation err cuz of multiple decl of int a ?
}
Can parent and child class in Java have same instance variable ?
===

Consider this class:

class parent {
 int a;
}

class child extends parent {
 int a; // should this not give compilation err cuz of multiple decl of int a ?
}