What is the difference between and interface and an
abstract class ?

Answer Posted / sathish kumar.t

ABSTRACT CLASS Interface

It consist of Static It consist of non- static member
member variables variables

It consist of non-abstract It consist of only abstract
and abstract methods methods

it consist of private and It consist of public classes
protected classes

It uses the keyword Extends uses the keyword Inplements

If subclass extends the If the subclass implements
abstact class, cannot extend interface, can implement any
any other class number of interfaces

Is This Answer Correct ?    19 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a class in oop?

608


Why is polymorphism needed?

605


Describe these concepts: Polymorphism, Inheritance and Abstraction.

616


What do you mean by overloading?

586


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1623






String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

1944


What is object in oop with example?

706


i got a backdoor offer in process global,Bangalore..Can i work with it?

2330


What is encapsulation in oop?

611


What is the benefit of oop?

571


What is a class and object?

600


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1151


What is basic concept of oop?

702


What is abstraction in oops?

591


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

2010