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 the diamond problem in inheritance?
Program to open a file with First argument
What are the valid types of data that the main () can return in C/C++ language
what is the definition of incapsulation
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).
Can we have a private constructor ?
12 Answers HSBC, Ness Technologies, TCS, Wipro,
What are oops methods?
Please send ford technologies placement paper 2 my mail id
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?
string is a class or data type in java?
What is oops and its features?