what is the difference b/w abstract and interface?
Answer Posted / bhaskar.mantrala
Interfaces are same as classes but their methods are
declared with out any body..... and definition
corresponding to that allmethods will write on
implementation class(i.e)single class.BUT
Eg:
interface interfacename
{
//Declarations only
//first method
//second method
..
..
//n-th method
//final variables
}
class classname implements interfacename
{
//Definitions of ALL methods present in interfacename
}
Abstract class also has same as interface and definitions of
all those methods may not be present in single extended class.
And we doesn't create an object to class that is abstract.
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is an advantage of polymorphism?
What is pure oop?
Do you know about multiple inheritance?
How long to learn object oriented programming?
What does and I oop mean in text?
What is the point of polymorphism?
Is html an oop?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
What is persistence in oop?
What is interface in oop?
What are the features of oop?
Why is static class not inherited?
What is difference between data abstraction and encapsulation?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
What is overloading and its types?