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
What is visibility mode?
What is size_t?
When do you get classcastexception?
Difference between error and exception
What is enhanced loop in java?
What is arraylist e in java?
What is the protected method modifier?
Why charat is used in java?
Why arraylist is used in java?
Write a program to find the whether a number is an Armstrong number or not?
Why generics are used in java?
java Technical questions asked by JPMC
How do you do a line break in java?
how would you implement a thread pool? : Java thread
What are internal and external variables?