difference between Abstract and Interface?

Answer Posted / ravi raj

Abstract Class:
---------------
1.abstract class contain the abstract and non-abstract methods
2.abstract class contain static and non-static variables
3.through abstract class we can get 0-50% abstraction in java
4. if any class declared as a abstract i.e abstract class
5. we wont create instance for this class.
6. we cont make final for this class.

Interface :
-----------

1. Interface contains only abstracted methods.
2. it allows only static and final variables.
3. interface is by default abstracted and public.
4. through interface we get 100% abstraction.
5. we can solve the multiple threading in interface.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is orm?

669


How a component can be placed on Windows?

2257


Do I need to import javlang package any time? Why ?

619


What is the difference between the ‘font’ and ‘fontmetrics’ class?

629


Is a class a subclass of itself?

582






What is the argument type of a programs main() method?

557


How to implement RMI in Java?

2395


What is the difference between the session.update() method and the session.lock() method?

549


Write a singleton program?

562


What is metaspace?

538


What are the benefits of detached objects?

577


What is the difference between RMI registry and OS Agent?

623


Describe responsibilities of Activator?

1664


Can you give me a simple example of using the requiredif validator rule?

594


What is the purpose of the notifyall() method?

600