+1 vote
in JAVA by

Can a subclass access private members of its superclass in Java?

1 Answer

0 votes
by

No, a subclass cannot access private members of its superclass in Java. Private members of a class are only accessible within the class and are not inherited by subclasses.

Related questions

0 votes
asked Aug 21, 2022 in JAVA by sharadyadav1986
0 votes
asked May 2, 2021 in JAVA by sharadyadav1986
...