posted 21 years ago
Employee has variable: int i = 5
and method: int getI()
Manager has variable: int i = 10
and same method.
When this is issued:
Employee m = new Manager();
What happened here?
What I know is the object m's variable is in Employee's but the method is Manager's.
What is the concept behind it?
Thanks.