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
If we don’t want some of the fields not to serialize how to do that?
Why we use protected in java?
What is Java Annotations?
Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.
Can we use return in constructor?
In a container there are 5 components. I want to display all the component names, how will you do that?
What is executor memory?
What is increment in java?
How can we create a thread in java?
What do you understand by the term singleton?
What is the indent key?
Can we create an object of static class in java?
when you will synchronize a piece of your code? : Java thread
What is an example of a conditional statement?
Explain java coding standards for variables ?