Why can?t you specify the accessibility modifier for methods
inside the interface?
Answer Posted / tsahi
Interfaces are designed to make sure a class which
implements them exposes a certain set of methods. Because
these methods are exposed, they must be public. therefore,
there is no point in implementing a method from an interface
which will be anything other than public. So all methods in
an interface are always public.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Why do we use reflection in c#?
How long can loop recorders stay in?
What are jump statements in c#?
How can I access the registry from c# code?
Can we have only “try” block without “catch” block in c#?
What is a type c#?
What is difference between const and static in c#?
What is the difference between finally and finalize block?
What do you use c# for?
What is disco?
What is a factory in c#?
How main method is called in c#?
What is data types in c#?
What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?
Is php easier than c#?