Difference between Concrete class and Abstract class

Let's have a look at the Concrete class and Abstract class.


Concrete class:-



  1. A concrete class is nothing but normal class, we can use as a base class or may not.

  2. Not compulsory, it can't contain abstract methods.

  3. We can instantiate the object and work with this class.


Eg :

class Sample
{
public void MyMethod()
{..............}
}

Abstract class:-



  1. An abstract class is a class which declared with a keyword Abstract.

  2. Must be used as a base class.

  3. Only intention to declare an abstract class is to use as a base class that is we can't create an object of this class like concrete class.

  4. It can contain abstract methods as well as concrete (normal) methods.


Eg :

public abstract class MyClass
{
public void MyMethod()
{..............}

public abstract TestMethod()
{
.........
}
}

 
Author : Valli Perumal

10 comments:

  1. I was recommended this website via my cousin. I am now not
    sure whether or not this submit is written by means of him as nobody
    else realize such special about my problem. You're amazing!

    Thanks!

    ReplyDelete
  2. Hi! This is kind of off topic but I need some guidance from an established
    blog. Is it very difficult to set up your own blog? I'm not very techincal but I can figure
    things out pretty quick. I'm thinking about creating my
    own but I'm not sure where to start. Do you have any tips or suggestions?
    With thanks

    ReplyDelete
  3. I spent a great deal of time to find something like this

    ReplyDelete
  4. With thanks! Valuable information!

    ReplyDelete
  5. good stuff. I will make sure to bookmark your blog.

    ReplyDelete
  6. Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome! Rectify

    ReplyDelete
  7. These guidelines are meant only as guidelines for those who are looking for contractors. Of course, one can still come up with unique ways on how to look for contractors. concrete contractor

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Before you pour concrete you need to consider the climate and temperatures that the concrete will be subject to. If the concrete is intended to weather outdoors in a sub zero climate then you will need to use a special concrete mix to make sure that the concrete does not fail from the freeze and thaw conditions. gabconcretelincolnne.com

    ReplyDelete
  10. As the title suggests, we live in a world which is now very commonly referred to as a "concrete jungle". This term is usually seen in a negative light, as it implies ruining our forests in the process of making everything concrete. concrete stains

    ReplyDelete

Powered by Blogger.