what is the difference between interface and abstraction?
Answer Posted / navin c. pandit
In Interface, all the member functions are abstract implicitly
so it is imp. to define all fn. declared inside Interface.
Moreover, we cann't define a fn. or we cann't declare any
member variable in an Interface. Also, we cann't declare or
define any non-abstract method in Interface.
In Abstract class, we can declare an abstract method as well
as we can also define a non-abstract method. We can also
declare a variable member in abstract class.
In both the condition, declared abstract method is
implemented out side the class i.e in derived class which
inherits Interface/Abstract class, whatever you have used.
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
There were a lot of questions asked, so I will list the topic (and add a what is "topic" and know pros/cons). Extreme programming, what is a transaction, various SDLC design approaches, what is a namespace, define a good test case, what is a stored proc, webservice? design patterns? linker? compiler? access modifiers? stack vs. queue? arrays vs. linked lists? sorting algorithms? recursion? OOP principles?
what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?
What does async mean in c#?
Why use a singleton instead of static methods?
Is int a struct in c#?
What is an object pool in .net?
What is wcf c#?
Describe ways of cleaning up objects in c#.
What is unrecognized escape sequence in c#?
What can I create with c#?
How can i Spawn a Thread
Can a class be protected in c#?
What is the difference between ienumerable and enumerable?
What is the difference between icomparer and icomparable in c#?
Is clr a compiler?