Can you have abstract methods in an interface?
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 Copenhagen, Lives in Copenhagen, Denmark.
So the difference is an abstract class can have implemented methods whereas a interface cannot. All of the methods in an interface are implicitly abstract, so the abstract modifier is not used with interface methods (it could be--it's just not necessary).Sep 30, 2011
2023-06-12 06:42:29
评论(499)
Helpful(122)
Helpful
Helpful(2)

Isabella Patel
QuesHub.com delivers expert answers and knowledge to you.
So the difference is an abstract class can have implemented methods whereas a interface cannot. All of the methods in an interface are implicitly abstract, so the abstract modifier is not used with interface methods (it could be--it's just not necessary).Sep 30, 2011