what is the difference b/w abstract and interface?

Answers were Sorted based on User's Feedback



what is the difference b/w abstract and interface?..

Answer / n.suresh

Abstract can,t support multiple inheritence.
Interface can suppport the multiple inheritence.

Abstract have accesbulity modifiers.
Interface have no accesbulity modifiers.

Is This Answer Correct ?    11 Yes 0 No

what is the difference b/w abstract and interface?..

Answer / 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

More OOPS Interview Questions

What is static in oop?

0 Answers  


What do we mean by a hidden argument in a function?

1 Answers   TCL,


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

0 Answers  


Write a c++ program to display pass and fail for three student using static member function

0 Answers  


Write pseudo code for push in a stack?

2 Answers   emc2,






What is the fundamental idea of oop?

0 Answers  


where is memory for struct allocated? where is memory for class-object allocated? I replied for struct in stack and for class-object in heap. THen he asked if class has struct member variable what happens.class on heap and what about struct in that class? couldnt ans :( :-?

2 Answers   Infosys, Microsoft,


What is oop in simple words?

1 Answers  


How does polymorphism work?

0 Answers  


explain the concepts of oops?

1 Answers  


What is polymorphism used for?

0 Answers  


Why do while loop is used?

0 Answers  


Categories