Difference among concrete class and abstract class
Hi All,
I am studying the object oriented programming. I am not able to understand the concrete class and abstract class concept.
What is the difference among concrete class and abstract class? Is there any syntax changes?
Please help me to solve confusion regarding.
Re: Difference among concrete class and abstract class
Hi,
Abstract class:
A class which defined with "Abstract" keyword is referred as "Abstract class ".The Abstract class is must be a base class.It can comprises normal as well as abstract methods.
Example:
Quote:
public abstract class DemoClass
{
public void DemoMethod()
{..............
}
public abstract DemoMethod()
{
.........
}
}
Concrete class:
Concrete class is used as base class. Concrete class doesn't contains abstract methods, you can create methods in it.
Re: Difference among concrete class and abstract class
Hi friend,
*. Class which is useful in the object creation is called as "Concrete Class"
While a class which is not useful in the object creation is called as "Abstract Class".
*. Abstract class doesn't contains instances for direction . The derives class is must be a Concrete Class.
*. Abstract class must contains at least single abstract method. There is no method to create a objects for the abstract class.
Re: Difference among concrete class and abstract class
Hi,
Please review carefully the below example, which explain the declaration as well as the implementation of the "abtract class" and "abstract methods":
Quote:
public abstract class Vh
{
public abstract void goHill();
private String t;
public String getType()
{
return t;
}
}
public abstract class Cr extends Vh {
public abstract void goHill();
public void CrThings() {
}
}
public class Mn extends Cr {
public void goHill() {
}
}
Re: Difference among concrete class and abstract class
Hi Everyone!
Im new here in this site!
Ok Thanks for that info.
Keep the good work!
I hope I can have more friends and fun here!
Keep on posting Guys!
Thanks!...
Good Luck to all!...