Can we inherit private class in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at NVIDIA, Lives in Santa Clara. Holds a degree in Computer Engineering from Georgia Institute of Technology.
Only protected and public methods/variables can be inherited and/or overridden. Private means you can Only access it in that class an no where else. Subclasses can only invoke or override protected or public methods (or methods without access modifiers, if the superclass is in the same package) from their superclasses.
2023-05-09 12:30:16
评论(499)
Helpful(122)
Helpful
Helpful(2)

Ava Nelson
QuesHub.com delivers expert answers and knowledge to you.
Only protected and public methods/variables can be inherited and/or overridden. Private means you can Only access it in that class an no where else. Subclasses can only invoke or override protected or public methods (or methods without access modifiers, if the superclass is in the same package) from their superclasses.