why abstract class does not have object creation

Answers were Sorted based on User's Feedback



why abstract class does not have object creation..

Answer / sonykrishna90

bcz of abstract class have abstract methods and concrete methods in that process does n't have method body so how can know the jvm how much memory will allocate for that method so we dont have the creation of object.and another answer is abstract class abstract methods may have or may not also in that JVM was fixed for when abstract key word is coming there no object instantiation.

Is This Answer Correct ?    20 Yes 5 No

why abstract class does not have object creation..

Answer / kd singh

"Abstract class has not implemented method so, we cant create the object" "The word 'Abstract' instruct the clr that not to create object of the class"

But in a simple class where we have all virtual method, able to create an object???

Also, we can define different access modified to Abstract class constructor like private, protected or public.

An abstract type is defined largely as one that can't be created. You can create subtypes of it, but not of that type itself. The CLI will not let you do this.

An abstract class has a protected constructor (by default) allowing derived types to initialize it.

Is This Answer Correct ?    5 Yes 1 No

why abstract class does not have object creation..

Answer / sushila sonare

if we create an object for abstract class, so through object
reference we can use all method. But in abstract class some
method is abstract, i.e. they don't have body of the method.
At the time of method calling we are getting error. Compiler
don't know what to do. To avoiding this problem its
restricted to create an object

Is This Answer Correct ?    4 Yes 1 No

why abstract class does not have object creation..

Answer / nikhil agrawal

Abstract class containing abstract method as well as concrete method(Having body). The purposes of object creation is to call the method.but the class containing incomplete method means abstract method. its not possible to call incomplete method whose body is not defined. that's why Abstract class does not have object creation.

Is This Answer Correct ?    2 Yes 1 No

why abstract class does not have object creation..

Answer / ashutoshssolankar

we cant create object of the Abstract class because of the
concrete method have no body but we can create object of
another class by using overriding the method of the Abstract
class in another class.

Is This Answer Correct ?    2 Yes 5 No

why abstract class does not have object creation..

Answer / meenakshi

absract class contain defined and undefined methods,,so when we create object for abstract class we need to override both defined and undefined methods inorder to avoid overriding defined methods for abstract class there is no object creation...

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More Core Java Interview Questions

Can we have this () and super () together?

0 Answers  


What is javac in java?

0 Answers  


Is it safe for adding 10,00,000 records/objects to HashMap?, i.e is it safe to add millions of objects to HashMap?

2 Answers  


How do you define a parameter?

0 Answers  


How do you trim a space in java?

0 Answers  






What do you mean by Remote procedure call?

2 Answers  


What is the meaning of I ++ in java?

0 Answers  


How big is a gigabyte?

0 Answers  


What are the important features of Java 11 release?

0 Answers  


What do you understand by final value?

0 Answers  


Can we extend a class with private constructor?

0 Answers  


What is the differences between heap and stack memory in java? Explain

0 Answers  


Categories