Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Is it possible to create object of abstract class?

user-image
Question ajoutée par Vani Acharya , Assistant Teacher , Lorven Public School Chandapura
Date de publication: 2014/07/02
Mohammed Ameen
par Mohammed Ameen , Java Developer , TATA Consultancy Services Limited (TCSL)

We cannot create objects of Abstract Class.

 

EXPLANATATION: Abstract class is a class which can contain both abstract and concrete methods.Hence suitable place for defining common functionalities across all the implementations.In Short,Abstract class is used to DEFINE SKELETAL STRUCTURE which the subclass must follow.

Ayushi Bansal
par Ayushi Bansal , Intern , Wipro Infotech Ltd.

No we can't create object of abstract class as abstract class is that class in which we declare and not define the method.And for that we implement,not create the object.But this is not always true sometimes we can create object indirectly by using inner class.

Utilisateur supprimé
par Utilisateur supprimé

Nope.

nishanth soma
par nishanth soma , junior software developer , Halsys it solutions

no

Arpit Khatri
par Arpit Khatri , Java Technical Lead , Qmetry india Pvt ltd

No.

 

You can't instantiate an abstract class but subclasses instance  of  there abstract class is possible.

Ferdous Tahir
par Ferdous Tahir , Computer Teacher , Al - Yusr International School

No

Utilisateur supprimé
par Utilisateur supprimé

NO

Shameer Habeeb
par Shameer Habeeb , Java/J2ee Team Leader, Corratech, Infopark, Cochin , Kerala

No, You can only upcast to it.

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?