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 8 bit signed integer?

866


What is stringreader in c#?

828


Can interface inherit class in c#?

928


What is anonymous class in c#?

871


What does public mean in c#?

874


What is difference between constants and readonly in c#?

978


What is ulong in c#?

983


In a single .NET DLL how many classes it contains?

883


What is difference between float and integer?

945


Does c# support multilevel inheritance?

832


Are c# references the same as c++ references?

946


What is the use of table aliases?

854


What is streamreader/streamwriter class?

886


What does string format do?

826


Is unboxing an implicit conversion?

952