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 purpose of inheritance?
what are the different types of qualifier in java?
Can enum be null?
What is meant by oops concept?
What is constructor overloading in oop?
Which method cannot be overridden?
explain sub-type and sub class? atleast u have differ it into 4 points?
What is polymorphism and its types?
What do you mean by overloading?
What is the main purpose of inheritance law?
What is polymorphism oop?
what is graphics
What causes polymorphism?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What is difference between multiple inheritance and multilevel inheritance?