InterviewSolution
Saved Bookmarks
| 1. |
Explain the different access modifiers that are available in Scala. |
|
Answer» Using access modifiers, you can limit the scope to particular regions of code. Scala has three access modifiers: public, private, and protected. If you wish to use an access modifier, you must INCLUDE its keywords private/protected/public in the definition of a member of the package, class, or object. By default, the access modifier is public if neither of these keywords is USED.
|
|