Difference between interface and abstract class?

Answers were Sorted based on User's Feedback



Difference between interface and abstract class? ..

Answer / jenypatel86

There is no difference in the functionality of these two.The
only difference is that a class cannot extend an abstract
class if it already is extending some other class.An interface
on the other hand can be implemented in any situation which
makes them very powerful.Also user defined exceptions can be
defined within an interface itself, which is not the case with
an abstract class.

Is This Answer Correct ?    6 Yes 0 No

Difference between interface and abstract class? ..

Answer / m.shanmuga sundaram rjnsoftwar

There are some subtle differences between an abstract class
and an interface

1)
A class can inherit multiple interfaces
A class can inherit only one abstract class

2)
An interface does not contain any access specifier,fields
and code. By default the access specifier is public.

An abstract class can contain any access specifier,fields
and code.

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More Programming Languages AllOther Interview Questions

why we use mantis? what u mean mantis in IT trends? addvantages of mantis?

0 Answers   HCL, Sacred Heart College,


how can we get version of database ?

1 Answers  


write a program for finding the union of two integer array in java?

2 Answers  


Write a pseudo code to evaluate a number to any base given (2...16) based on the input. Number greater than 9 should be given as A-F for 10-15.

0 Answers   Goldman Sachs,


Diff between IF and where ?

0 Answers   Accenture,


.net 2005 supports how many languages?

4 Answers  


How to connect the .accdb database file of microsoft access to the Visual Basic 6.0 forms?

0 Answers  


WS-NUM PIC S9(05)V(02) SIGN TRAILING SEPARATE MOVE '0050000+' TO WS-NUM The value stored is 00500,00+ MOVE '0050000-' TO WS-NUM Then what is the value will be stored in WS-NUM? Am getting '-00500,00'.....>>> What should I declare to WS-NUM so that I can get correct values for both + & - signs.

0 Answers  


what is difference between VB5 AND VB6.0

2 Answers   Satyam,


Diff between %let and Call symput?

1 Answers   Accenture,


what type of exceptions & problems are faced in production time at java technology?

0 Answers   CTS,


what is dynamic polymorphism?

2 Answers   Satyam,


Categories