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

what are the activation groupworks?

0 Answers  


What is a task?s priority?

1 Answers  


how java is os independent language ?

3 Answers  


What does module-relative mean?

0 Answers  


Is it possible to stop the execution of a method before completion in a sessionbean?

0 Answers  






What you mean by COM and DCOM?

0 Answers  


Explain what is orm?

0 Answers  


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

0 Answers  


if i know the lenght of collection in hand, should I use Array or Arraylist? justify

1 Answers   iTrust,


What is private static final long serialVersionUID = 1L;

3 Answers   Google,


What is aop(assepct oriented programing)?

0 Answers  


Explain the different types of memory used by jvm?

0 Answers  


Categories