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

How many functional interfaces does java 8 have?

594


What happens if we override only equals?

572


Write the algorithm to check the number non-leaf nodes in a tree.

577


Why packages are used?

536


Tell me about your ability to work under pressure

1763






Why does it take so much time to access an applet having swing components the first time?

1384


What is the difference between serializable and externalizable interface?

561


Can static method access instance variables ?

583


Can a class be declared as static?

667


What is meant by interface?

557


whatis Home interface and Remoteinterface? with example?

1537


what is a working thread? : Java thread

541


What are user defined exceptions?

582


What is an example of declaration?

513


What do you understand by overloading and overriding in java?

535