Can you help me to understand clearly ,what is abstract class? And how i will used it, how it behaves in a class.
Thank you in advance!
An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.
1.Abstract class is a class which contains both abstract and concrete methods.
2.An Abstract class may or may not contain any abstract methods.
3.A class which will be declared as abstract then no need of that it must contain an abstract methods. But a class which contains an abstract methods then it must be declared as abstract class.
4.An abstract class cant be instantiated.
5.But we create a reference for an abstract class
6.suppose if we want to implement common methods for all subclass then we go for abstract class. other wise we go for interfaces.
7.We can't use both abstract and final at a time.
The other guys pretty much covered it
but in simple terms...
2 types of classes
Concrete class is the name used for the normal classes.
An abstract class can't be instantiated meaning abstract class is a class that you can't create objects from. It is useful for polymorphism and inheritance and stuff like that.
Abstract class is pretty much useless unless you extend it or its inherited.
Abstract methods are methods without a body(no curly brackets) just the header.
Abstract methods must be overridden .The point of having a abstract methods is for consistency and polymorphism. If a class uses abstract method the class must be declared as abstract.
if there is anything that you not sure with just ask
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Hi. Im using vb 2010. I want to dynamically add textboxes to my form by clicking on a button. I've google searched and so far this code worked:
Private Sub btn_addline_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_addline.Click Dim txtB1 As New TextBox Dim i For i = ...