In Java, class A defines a member variable private int num;
Class B is a subclass of class A.
1- If the two classes are in the same package - does B inherit num
?
2- If the two classes are not in the same package - does B inherit num
?
B does not inherit or have access to num
in either of those cases.