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 the diamond problem in inheritance?

0 Answers  


Program to open a file with First argument

1 Answers   TCS,


What are the valid types of data that the main () can return in C/C++ language

3 Answers  


what is the definition of incapsulation

2 Answers  


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

0 Answers  






Can we have a private constructor ?

12 Answers   HSBC, Ness Technologies, TCS, Wipro,


What are oops methods?

0 Answers  


Please send ford technologies placement paper 2 my mail id

0 Answers  


Input: enter the value:1234 output: 1 2 3 4 write a program to get above output.....

4 Answers   Bally Technologies, IBM, SoftSol,


how to swap to variables without using thrid variable in java?

5 Answers  


string is a class or data type in java?

3 Answers  


What is oops and its features?

0 Answers  


Categories