difference between Abstract and Interface?

Answers were Sorted based on User's Feedback



difference between Abstract and Interface?..

Answer / 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

difference between Abstract and Interface?..

Answer / kumar rk

interface
---------
in java interfaces are fully unimplemented structures.
here all methods are public and abstract by default(added by compiler)

abstract class
--------------
abstract classes are partially implemented structure.
means it can have abstract method or may be not.
but in every case object cannot be created.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

which type of objects reference will be given to client?

0 Answers  


what are memory considerations of jsp compares to other web components?

0 Answers   TCS,


What is a thread?

3 Answers  


What is RPC?

2 Answers  


How substring() method of string class create memory leaks?

0 Answers  


diff vector arraylist

4 Answers   Saka Solutions,


What is clustering? What are the different algorithms used for clustering?

0 Answers  


what is container?

3 Answers   Infosys, Infotech,


whats is mean by jndi

1 Answers   SolutionNET,


What is the difference between the string and stringbuffer classes?

0 Answers  


What is the difference between RMI and Corba?

0 Answers   Infotech,


Hello, I'm java developer. My skill is programming with java,jsp, struts, struts2+spring, hibernate, eclipse, tomcat, mysql,Oracle,Middlegen and other open source technology. I'm interest work any web base project that use my ability above. The thing is that I have never got any chance to work in this field though i am very much comfort with my skills. So if any body want me then i will happily join you. Also I have also some of my friends if you. If you interest to outsource any project to me then also you are welcome. you can reach me by email at me4bangalore@yahoo.in

4 Answers  


Categories