adspace


why abstract class does not have object creation

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to find the whether a number is an Armstrong number or not?

1107


Is minecraft 1.15 out?

1049


Differentiate between static and non-static methods in java.

1131


Explain public static void main(string args[]) in java.

1084


Write a program to print count of empty strings in java 8?

1092


How to create a base64 decoder in java8?

1144


What is the difference between break and continue statements?

1131


What is java string pool?

1088


What is a constructor overloading in java?

1131


How to sort array in descending order in java?

999


Realized?

2272


What is parsing in java?

1046


What is an object in java and how is it created?

1147


explain different ways of using thread? : Java thread

1089


What do you mean by an interface in java?

1107