Difference between abstract class and interface
Answer Posted / ved prakash mishra
ABSTRACT CLASS:-An abstract class declares common attributes and behaviors of the various classes in a class hierarchy. An abstract class typically contains one or more abstract methods that subclasses must override if the subclasses are to be concrete. The instance variables and concrete methods of an abstract class are subject to the normal rules of inheritance.
Attempting to instantiate an object of an abstract class is a compilation error.
Failure to implement a superclass's abstract methods in a subclass is a compilation error unless the subclass is also declared abstract.
we can use abstract superclasses to declare variables that can hold references to objects of any concrete class derived from those abstract classes. Programs typically use such variables to manipulate subclass objects polymorphically. We also can use abstract superclass names to invoke static methods declared in those abstract superclasses.
interface:- A subclass can inherit "interface" or "implementation" from a superclass. Hierarchies designed for implementation inheritance tend to have their functionality high in the hierarchyeach new subclass inherits one or more methods that were implemented in a superclass, and the subclass uses the superclass implementations. Hierarchies designed for interface inheritance tend to have their functionality lower in the hierarchya superclass specifies one or more abstract methods that must be declared for each concrete class in the hierarchy, and the individual subclasses override these methods to provide subclass-specific implementations.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain the difference between inprocess vs out process session state : 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.....
So what exactly is the configuration file for then?
What is ILDASM ?
Explain how to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile
Explain the types of memory management? : .NET Architecture
When do I need to use gc.keepalive?
What is cookie less session?
Explain how cache is used? : Dot net architecture
How cache is used? : Dot net architecture
Can you explain update progress control?
Explain about developer benefit from memory management?
where should I put this information then?
How can we integrate atlas with web services?
12. Types of polymorphisem[Run and Design Exp.]