Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Krishna GaradRank #191 · 12.8K reputationPosted Mar 17, 2011, 1:20 AM EDT
Interface is only set of rule if we are applying any accessibility on the rules then why to implement the interface. Who want the restriction on there own they may implement that interface and who dont want they will not implement that interface. That's the reason we can't specify accessibility modifier for methods or any other member of inside the interface.
Interface contain only decleration not Defination. Whatever defenation we are giving that in the classes who are implement that interface.
VulpesRank #55 · 29.2K reputationPosted Mar 17, 2011, 1:46 AM EDT
Andrew FensterRank #983 · 2K reputationPosted Mar 17, 2011, 4:27 AM EDT
If you want to specify private or protected methods, you need to create a base class instead.
Honestly, this is a very important topic for you to understand. If you want to make your living as a programmer, it's something you absolutely must master. You should get a book and spend several hours studying the subject. Then go over it again next week and again next month and again the month after that, etc. You can't get it by asking questions on a forum.