What is default access modifier in Scala?Does Scala have 'public' keyword?
Answer / Sushant Panigrahi
The default access modifier in Scala for classes, objects, and members is `package private`, which means they are accessible within the package only. However, for methods, constructors, and fields declared outside of any class or object, the default access level is `public`. Yes, Scala does have a 'public' keyword, but it is used to explicitly declare that a member should be accessible from everywhere, including other packages.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is Scala?
Explain extractors in scala?
What is scala trait?
What is implicit class in scala?
What are the advantages of case class?
What is listset in scala collection?
Differentiate nil, null, none, and nothing in scala.
Mention the advantages of scala?
What is the difference between :: and #:: in scala?
What is call-by-name? Does Scala and Java support call-by-name? What is the difference between call-by-value and call-by-name function parameters?
What do you understand by tail recursion in scala ?
Explain exception handling in scala?