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 is JTS?

0 Answers  


Define the remote object implementation?

0 Answers  


difference between apllet and interface class

1 Answers   Infotech,


Why RMI required an interface?

1 Answers  


How to determine applet?s height and width?

1 Answers  






What are the sequence of steps to write pub or sub model kind of application?

0 Answers   TCS,


whats is mean by class.forName() whats the return type of class

6 Answers   SolutionNET,


If we opened windows notepad 4 times, does it starts 4 processes or 4 threads?

1 Answers  


how java is os independent language ?

3 Answers  


Write a singleton program?

0 Answers  


difference between Abstract and Interface?

2 Answers   HCL, Infotech,


What are the types of data passing mechanisams under JMS specification?

1 Answers  


Categories