Can you explain the difference b/n abtract and interface
with a good example,?In what cases we have use abtract and
what case interface?
Answer Posted / ipdarsini
Interface is the 1st Level.here methods does not contain
any executable code.just it contains only declerations.here
in interface level we does not know anything.
Abstract class is a class which contains methods which may
contains exceutable code or not.this is the 2 nd level.here
in abstarct class level we know some thing.
for ex take a maruthi car.......
in interface level.
we doesn't know about egine company........some parts.....
we know .....but its not sure...
in abstract class level
for ex take a maruthi 800 car......
we knows the comapany of that car.
here we know about some thing bcz here they mentioned
maruthi 800....
thats the difference.....
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
Can one thread block the other thread?
How do you make a thread in java?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
Why do we create public static method in java?
Can long be null in java?
how to convert Java project into Maven ?
State the difference between creating string as new () and literal.
Can we convert stringbuilder to string in java?
Define how objects are stored in java?
What are the major advantages of internal iteration over external iteration?
When is the arraystoreexception thrown?
What is a function in java?
Explain the difference between runnable and callable interface in java?
Can we use string in the switch case?
Explain when classnotfoundexception will be raised ?