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

what is software

2 Answers  


how to convert the data from HTML file to SAS dataset?

0 Answers   Accenture,


what are the differences between CONS, LIST, and APPEND

0 Answers   Comtech,


How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?

0 Answers  


SYNFOSYS PLACEMENT PAPER 2010 Hi Friends I have attended the recent synfosys test 2010. Here r some questions which i remember. Section – I 1) There are 12 balls weigh similar but one is dissimilar (more/less). How to find the dissimilar ball with minimum no of weighs? 2) There r 7people carrying 7bags. Each bag contains 7cats. Each cat has 7small cats. How many total legs r there? 3) There are 12 balls weigh similar but one is dissimilar (more/less). How to find the dissimilar ball with minimum no of weighs? 4) 5) There r 2 poles each 15 meters high. A cable of length 16 meters is tied between pillars top. For its maximum the cable lies down above 7mts high from the ground. What is the distance between pillars? ------------------------------------------------------------ ------------------------------------------------ Section -II What is the value of 11^5 Some Other quetions ------------------------------------------------------------ ------------------------------------------------ Section - III 16) Serialization and deserialization? 17) Will finally block execute even though there is an exception & return statement are there in catch block? Explain? 18) memory leak? How can we avoid it? 19) virtual destructor? 20) Two program codes for code optimization? ------------------------------------------------------------ ------------------------------------------------ Section – IV Q) Program for finding the alternate digits of the number If number is 35846 then Sum1=3+8+6=17 Sum2=5+4=9 Q) Program for Single linked list? ------------------------------------------------------------ ------------------------------------------------ Section - V Q) What is software engineering? Explain SDLC Q) Explain any two upcoming IT Scenarios? ------------------------------------------------------------ ------------------------------------------------ Regards Gopinath Allanku +91 9885457211

2 Answers   synfosys,






Diffrence between 2.0,3.0,3.5,4.0. versions of .net?

0 Answers  


List and explain any five built in functions for Lists data type in python

1 Answers   Peerless,


along with oracle which language will be beneficial to have knowledge with,java,.net,since i m doing oracle have appeared for 8th sem BEIT,plz suggest

0 Answers  


differenc between visual studio 2005,2008 & 2010?

2 Answers  


how to study PHP my own? i reffered many sites.. but as being a fresher i couldnt follow those... which site will be the best one?

0 Answers  


what are stubs related to foxpro?

0 Answers  


Building Quotation engine program

5 Answers   Wipro,


Categories