Constructors

0%

Can a class or a struct have multiple constructors?

Correct! Wrong!

Can we add parameter to a static Constructor?

Correct! Wrong!

How to prevent a class from being instantiated?

Correct! Wrong!

Child class can call the constructor of a base class

Correct! Wrong!

Can we define public static Constructor?

Correct! Wrong!

We can not add access specifier with static Constructor explicitly .

What is use of Private Constructor?

Correct! Wrong!

Base class can call the constructor of a Child class

Correct! Wrong!

How to create instances of static classes?

Correct! Wrong!

Can structs have constructors?

Correct! Wrong!

Can we initialize non-static data fields within the static constructor?

Correct! Wrong!

It is not possible to initialize non-static data fields within the static constructor, it raises a compilation error.

Constructors
Begineer!
You need to work hard, here is a constructors tutorials
Intermediator!
You are good but there is work to be done here is a constructors tutorials
Pro !
You are excellent, for you referance here is a constructors tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *