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
Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.
What is treeset and treemap in java?
Write a java program to check if a number is prime or not?
Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example
What is thread start?
What do you mean Abstraction in java?
Is oracle charging for java?
What is gui programming?
How to split arraylist elements in java?
What type of variable is gender?
What is the difference between a method and a procedure?
Can we use different return types for methods when overridden?
What are the two types of java?
What is stack example?
Does every java program need a main?