What is the differances between a abstract calss and
interface

Answer Posted / kanan

Abstract class: You can inherit only one class.
Interface: You can inherit more than one interface.

Abstract class: It contains both completed and uncompleted
(abstract) methods.
Interface: It only contains uncompleted methods (methods
without body).

Abstract class: Access modifiers are there for methods and
properties.
Interface: It does not have access modifier for methods or
properties. By default they are public.

Abstract class: Fast
Interface: Require more time to find actual method in classes.

Abstract class: It can contain fields and constants.
Interface: no fields can be defining in interface.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is this pointer in oop?

557


What is the difference between abstraction and polymorphism?

617


How do you define social class?

601


can we make game by using c

3429


What is constructor overloading in oop?

607






What is encapsulation with example?

581


What is multilevel inheritance in oop?

557


Why oops is important?

614


What is oops concept with example?

578


What is balance factor?

589


write knight tour problem which is present in datastructure

2166


What is polymorphism give a real life example?

561


Whats oop mean?

595


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1417


What are the components of marker interface?

602