Difference between Abstract Class & Interface?

Answer Posted / brijendra kumar(xavient)

Abstract Class:

1-Abstact class declare with the abstract keyword.
2-Abstract class contains the both method declaration and
defeination.
3-Abstract class donot have the instant variable.It have
only constrants.
3-Abstract class extended by its sub class.
4-Abstract class support only single inheritence.

Interface:

1-Interface declare with the interface keyword.
2-Interface contains the only collection of method
signature.
3-Interface implement by a class.
4-Interface extended by one or more interfcae.
5-Interface support the multiple inheritence.
6-Interface is useful for java development.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I swap two variables without using a third variable?

709


What are the types of cookies in java?

704


How do you create a jar file?

698


How should I format my code? How should I comment my code?

694


How long can a lambda function run?

683


When a thread is created and started, what is its initial state?

725


What is tuple2?

714


What is difference between map and flatmap in java 8?

640


What is interceptor in java?

650


Which method is used to create the daemon thread?

718


Why do we need framework in java?

621


Which is best framework in java?

667


What are jdk tools?

661


What is lsdou? : java security

731


Do I need jdk or jre?

651