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
India Languages,
2 days ago
Business Studies,
2 days ago
Geography,
2 days ago
History,
7 months ago