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

Hi I am Rathnam, How To Remove the duplicates with out using remove duplicate stage in the datastage

0 Answers   TCS,


What are the advantages of Server Controls over HTML/ASP Controls.

1 Answers   Tesco,


How to set fixed width in particular <td> in html? if i type more character in this <td> it will not push near <td>. this is my question. can u tell me the answer...

0 Answers   SoftSquare,


HOW TO FIND NUMBER OF TWOS IN N!(N FACTORIAL)??

0 Answers  


7.x=10; y=20; x<<2=? x<<1=? y>>2=?

1 Answers  






how can i split string in a textbox in windows appication using C#.net

0 Answers   IBM,


Data Structure: Show that if k is the smallest integer greater than or equal to n+ (log2n)-2, k comparisons are necessary and sufficient to find the largest and second largest elements of a set of n distinct elements. (k comparisons are required to find what you are looking for, but no more than that are needed)

0 Answers   Student,


How to call a C++ function which is compiled with C++ compiler in C code?

0 Answers   Yahoo,


what is difference between java and c#

2 Answers   Cyient,


how many languages .net is supporting now?

4 Answers  


3 members in a pf.how we read 3 members without using ovrdbf.using rg pgms....

0 Answers   CTS,


I want to insert date in the form of yyyy-mm-dd... if any changes happen while inserting date format want to show error meg...any one can solve this..??

0 Answers  


Categories