Can you have private methods in an abstract class?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at the University of Zurich, Lives in Zurich, Switzerland.
Abstract classes are similar to interfaces. You cannot instantiate them, and they may contain a mix of methods declared with or without an implementation. However, with abstract classes, you can declare fields that are not static and final, and define public, protected, and private concrete methods.
2023-06-14 06:42:40
评论(499)
Helpful(122)
Helpful
Helpful(2)

Aria Garcia
QuesHub.com delivers expert answers and knowledge to you.
Abstract classes are similar to interfaces. You cannot instantiate them, and they may contain a mix of methods declared with or without an implementation. However, with abstract classes, you can declare fields that are not static and final, and define public, protected, and private concrete methods.