what is difference between abstract and interface?
can i give real time example for the two topics?
Answer Posted / srinu
interface:interface contain only undefined methods
Abstract: Abstract class contain some undefined methods 0r
some defined methods or all defined methods.
Ex: Real time Example
interface Father
{
public void studyDaily();
public void dailyGotoCollege();
}
Abstrct class Son implements Father
{
public Void studyDaily();---->But his son didnot Study
daily he does n't interet Daily
public void dailyGotoCollege()
{
System.out.println("yes Father I go to college");
}
}
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Is final static java?
Where import statement is used in a java program?
What advantage do java's layout managers provide over traditional windowing systems?
Why a dead thread occurs?
Convert Binary tree to linked list.
What is the difference between jfc & wfc?
Give me example of derived data types.
Are static members inherited to sub classes?
Explain about main() method in java ?
What are register variables what are the advantages?
Does java support multiple inheritance or not?
What is an array length?
What are the fileinputstream and fileoutputstream?
Why super is first line in java?
Is string an object?