Difference between abstract class and interface
Answer Posted / vikash kumar
1. interface contains methods that must be abstract;
abstract class may contain concrete methods.
2. interface contains variables that must be static and
final; abstract class may contain non-final and final variables.
3. members in an interface are public by default,
abstract class may contain non-public members.
4. interface is used to "implements"; whereas abstract
class is used to "extends".
5. interface can be used to achieve multiple inheritance;
abstract class can be used as a single inheritance.
6. interface can "extends" another interface, abstract
class can "extends" another class and "implements" multiple
interfaces.
7. interface is absolutely abstract; abstract class can
be invoked if a main() exists.
8. interface is more flexible than abstract class because
one class can only "extends" one super class, but
"implements" multiple interfaces.
9. If given a choice, use interface instead of abstract
class.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Whate are resource files? How are they used in .net?
Define a virtual memory? : Dot net architecture
What other than biginteger has been introduced in system.numerics namespace?
What is difference between .net and visual studio?
What are the main Tools to develop .Net Application?
Explain the difference between primary & secondary storage device? : .NET Architecture
How resource files are used in .net?
Explain hard disk? : Dot net architecture
I am working with asp.net 2005 and Crystal report 10. I have an image field on my dataset to show on Crystal report.And the image is shows dynamically from database in image field of CR. The image field is showing well on my Crystal report on its first page with all other data but when i click to open second page of CR,it does not show any data on that.I found that this is because of adding the image field on crystal report. Because when i remove the image field from the CR then it will run both the pages of CR. I am using the Page Load event to bind CR data with Database. And i have already check with the Init event to bind CR , but it still not shows the data on second page when i use image field on that. Please give solution for that.....
How do you handle this COM components developed in other programming languages in .NET?
What is .net mobile images control. : Microsoft dot net mobile
Explain the difference between inprocess vs out process session state : Dot net architecture
Explain Intermediate Language?
Can you Explain
difference between Response.write,server.transfer and also which one is used when ?