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


Please Help Members By Posting Answers For Below Questions

What is bit in c#?

620


How many types of namespaces available in version4?

598


How is a loop recorder monitored?

601


What is the correct way of declaring an xml namespace?

551


What is entity framework in c#?

563






What is managed or unmanaged code?

664


What is the default value of decimal in c#?

586


Explain inheritance in c#?

620


What is the data type for bit in c#?

583


What is difference between int and int in c#?

541


What is static classes in c#?

606


Why array is faster than arraylist in c#?

576


What is the difference between public, static, and void?

547


Can a abstract class have a constructor?

548


Can we override main method in c#?

573