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

Which class is the immediate superclass of the menucomponent class?

897


What is the difference between system.out ,system.err and system.in?

807


What is a modular application?

794


What is bean? Where can it be used?

798


Explain about RMI Architecture?

826


Describe, in general, how java's garbage collector works?

739


Should synchronization primitives be used on bean methods?

772


What is scalable, portability in the view of J2EE?

2184


What are the purpose of introspection?

935


Why use a datasource when you can directly specify a connection details?

765


Describe activation process?

2275


What method is invoked to cause an object to begin executing as a separate thread?

771


To what value is a variable of the string type automatically initialized?

867


Difference between new operator and class.forname().newinstance()?

822


What is the relationship between the canvas class and the graphics class?

758