Can a protected field of a class be inherited to subclass outside the package?
Answers
Answered by
0
Answer:
Members declared protected in a class in one package is inherited by subclass which could lie either in same package of the class or in different package. ... println(i); // works fine, since subclass inherit the protected member of super class no matter whether they are in same or different package
Similar questions