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
How many functional interfaces does java 8 have?
What happens if we override only equals?
Write the algorithm to check the number non-leaf nodes in a tree.
Why packages are used?
Tell me about your ability to work under pressure
Why does it take so much time to access an applet having swing components the first time?
What is the difference between serializable and externalizable interface?
Can static method access instance variables ?
Can a class be declared as static?
What is meant by interface?
whatis Home interface and Remoteinterface? with example?
what is a working thread? : Java thread
What are user defined exceptions?
What is an example of declaration?
What do you understand by overloading and overriding in java?