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

what are the advantages of JTA over JTS?

1677


Which are the different segments of memory?

604


Are there books about seam?

638


What is permgen or permanent generation?

592


What are the benefits of detached objects?

591






When a thread blocks on i/o, what state does it enter?

578


Can I map more than one table in a cmp?

598


What is ripple effect?

640


If I wanted to use a solarisui for just a jtabbedpane, and the metal ui for everything else, how would I do that?

576


What restrictions are placed on the values of each case of a switch statement?

543


What is a class loader? What are the different class loaders used by jvm?

589


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

602


What is ioc concept & explain it?

625


What is a tasks priority and how is it used in scheduling?

554


What is the difference between RMI registry and OS Agent?

636