What is the differances between a abstract calss and
interface

Answer Posted / porchelvi .a

ABTRACT CLASS:
-------------
• It can not be instantiated

• It allow us to specify all access modifier except
Private

• A class inheriting this must implement all of its
abstract method


• A class can inherit only one abstract class at a
time.

• Abstract class can add more functionality with out
destroying child classes that were using old version.


• We can declare the following
1. Fields
2. Constructors
3. Static Constructors
4. Static Functions
5. Concrete Functions

INTERFACE :
---------

• It can not be instantiated

• It allows only public Access modifier

• A class implementing interface must provide body
for its entire member.



• A class can implement more than one interface at a
time.

• Adding of additional functionality will have an
effect on its child class due to the necessary
implementation of interface methods.

• We can not declare the following
1. Fields
2. Constructors
3. Static Constructors
4. Static Functions
5. Concrete Functions

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism and example?

594


What is abstraction encapsulation?

663


What is inheritance in simple words?

627


I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...

1632


Why do while loop is used?

579






What is encapsulation with real life example?

573


What is oops in simple words?

585


How oops is better than procedural?

594


What is a class oop?

594


What does oop mean in snapchat?

688


Why do we use class?

638


What is encapsulation in oops?

541


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2010


What does and I oop and sksksk mean?

655


What are classes oop?

601