| Next Tip?
Home » General

Is it possible to create constructor for an Abstract class?

29 April 2010 215 views No Comment
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading ... Loading ...

Yes, its possible to create constructors for Abstract classes. We can create Private, Public and Protected constructors for Abstract classes

Example:

Abstract class  myAbstClass

{

public myAbstClass()

{ }

private myAbstClass(int x)

{ //some implementation }

protected myAbstClass(string strX, string strY, int x)

{ //some implementation }

}

Popularity: 25% [?]

Post to Twitter Tweet This Post

Related interview questions

Leave your response!

You must be logged in to post a comment.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes