what is the difference b/w abstract and interface?
Answers were Sorted based on User's Feedback
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 |
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 |
What is static in oop?
What do we mean by a hidden argument in a function?
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.
Write a c++ program to display pass and fail for three student using static member function
Write pseudo code for push in a stack?
What is the fundamental idea of oop?
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 :( :-?
What is oop in simple words?
How does polymorphism work?
explain the concepts of oops?
What is polymorphism used for?
Why do while loop is used?