Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we create instance for Abstract class?

Answer Posted / sudhakarramineni

Yes, but it is not recommended to create an instance
directly for abstract class, it may causes to crash the JVM.

First one thing you want to know is Abstraction. Hiding
unnecessary details to the user and expose the details which
are required to the end user is called abstraction.

Eg: In telephone, dialing a number is an interface and
complex circuit which takes keystrokes of a user and
performs the necessary operation is called it's implementation.

Generally, humans manage complexity through abstraction.
So any complex device can be operated by abstraction, even
though they don't know it's implementation.

Abstract class contains abstract methods and concrete
methods. A method without body is called abstract method
otherwise it 'll be treated as general method.

Solution:
If you want to create an instance for abstract class,
first you create a concrete subclass and create an instance
for that and use it.

Is This Answer Correct ?    37 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the purpose of using statement in c#

966


Why is hashset faster?

918


What is lazy loading and eager loading in c#?

878


What is a dll in c#?

854


What is the difference between dynamic and var in c#?

887


What are extender provider components? Explain how to use an extender provider in the project.

861


Can class inherit from struct c#?

930


Can a class or a struct have multiple constructors?

912


Can you create partial delegates and enumerations?

983


Why can't we use a static class instead of singleton?

836


Are there constructors in c sharp?

913


Why do we use lambda expression in c#?

902


What does the parsefloat function do?

876


What is binding in c#?

854


What is difference between gridview and form view?

969