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?

Answers were Sorted based on User's Feedback



Can we create instance for Abstract class?..

Answer / vijay

we can not create an instance of abstrct class;because
abstract class have incomlete methods

Is This Answer Correct ?    20 Yes 19 No

Can we create instance for Abstract class?..

Answer / deepakmodi

We can't create instance for Abstract class because its
methods are with out definitions. we can create an object
form derived class which we can use to call the methods

Is This Answer Correct ?    3 Yes 2 No

Can we create instance for Abstract class?..

Answer / rupali

we cant make object of abstract class becoz, in the vtable the vtable entry for the abstract class functions will be NULL, which ever are defined as pure virtual functions...

even if there is a single pure virtual function in the class the class becomes as abstract class..

if there is a virtual function in your class the compiler automatically creates a table called virtual function table .. to store the virtual function addresses.... if the function is a pure virtual function the vtable entry for that function will be NULL.

even if there is a single NULL entry in the function table the compiler does not allow to create the object.

Is This Answer Correct ?    1 Yes 0 No

Can we create instance for Abstract class?..

Answer / amit

salo kam ki cheez bhi likh diya karo

Is This Answer Correct ?    1 Yes 0 No

Can we create instance for Abstract class?..

Answer / lakshminarayana golla

hi manjitt can any body explain me about this below program?
it is executing successfully without any errors.
can u explain me what is the concept hide in this program
please.....

abstract class aa {
public abstract void main(String[] args);


}

class aaa {
public static void main(String[] args)throws Exception{
Object x = Class.forName("aaa").newInstance();
System.out.println(x);
}
}

Is This Answer Correct ?    2 Yes 2 No

Can we create instance for Abstract class?..

Answer / lakshminarayana golla

we can create object in 4 ways to create an object:

1.Using 'new' operator.

2.Using class.forName( classname ).newInastance();

3.Using clone();

4.Using getInstance();

can anybody explain me what is the difference between those
above 4 things??

Is This Answer Correct ?    1 Yes 1 No

Can we create instance for Abstract class?..

Answer / raghvendra

This is not at all related to this thread. here user
creating the object of class aaa which is not the abstract
object. abstract class is aa not aaa.

Is This Answer Correct ?    2 Yes 2 No

Can we create instance for Abstract class?..

Answer / kannan

its not possible

Is This Answer Correct ?    1 Yes 1 No

Can we create instance for Abstract class?..

Answer / rajesh parab

you can create at least in java 5.
YourAbstractClass obj= new YourAbstractClass (){}

try this.

but if you have abstrace method in it then you can not
create.

Is This Answer Correct ?    0 Yes 0 No

Can we create instance for Abstract class?..

Answer / d

we can create instance for abstract class through dynamic binding concept.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is gridview c#?

0 Answers  


Explain how can you clean up objects holding resources from within the code?

0 Answers  


Differentiate between copy and default constructor.

0 Answers   TCS,


How to properly clean up excel interop objects?

0 Answers  


How does return work in c#?

0 Answers  


What are strongly typed objects?

0 Answers  


without modifying source code if we compile again, will it be generated MSIL again?

0 Answers  


write a c# program add two matrix with input number ?

0 Answers   Wipro,


Describe ways of cleaning up objects.

8 Answers   Wipro,


What is querystring in c#?

0 Answers  


why sturcture ? why class?why you prefer structure and in which cases u go for class?

1 Answers   Microsoft,


Is datetime value type c#?

0 Answers  


Categories