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 / nt.jayan

Interface contains final variable and method signatures
only. All of this method and variable are should be public.
In Technically interface like Pure Abstract class.

Abstract class contains both abstract method also may having
some method defination. When we want to use some of the
functionality in abstract we use Abstract class.

Also, By using Interface we achieve multiple inheritence
using Implements. When we use Abstract class we can extends
only.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is faster set or list in java?

532


How to access arraylist elements in java?

493


What are java packages?

586


what do you mean by marker interface in java?

546


Name few java util classes introduced with java 8 ?

507






What is the difference between and ?

514


What is the constructor?

583


What is boolean keyword in java?

604


Explain the different forms of polymorphism?

570


What is the meaning of variable in research?

561


Are registers volatile?

533


Explain the difference between transient and volatile in java?

580


What happens if an exception is not handled in a program?

626


Explain jdk, jre and jvm?

567


What do u mean by variable?

567