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
Which class is the superclass of all classes?
What is meant by binding in rmi?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
how can i use a nonsynchronized hashtable?
what are the states associated in the thread? : Java thread
What does function identity () do?
What are the library functions in java?
Can constructor be inherited?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
What is executor memory?
Why do we need strings in java?
What is the byte order of byte buffer?
How to set the permissions to a file in java?
What is ctrl m character?
Is null a string?