Which keyword should you use?

You are developing a class named Account that will be used by several applications.
The applications that will consume the Account class will make asynchronous calls to the
Account class to execute several different methods.
You need to ensure that only one call to the methods is executed at a time.
Which keyword should you use?

You are developing a class named Account that will be used by several applications.
The applications that will consume the Account class will make asynchronous calls to the
Account class to execute several different methods.
You need to ensure that only one call to the methods is executed at a time.
Which keyword should you use?

A.
sealed

B.
protected

C.
checked

D.
lock



Leave a Reply 2

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