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 function currying in Scala?
Explain que?
What do you understand by apply and unapply methods in scala?
What is a ‘Scala set’? What are methods through which operation sets are expressed?
Explain traits in scala.
What is the difference between Java’s 'If..Else' and Scala’s 'If..Else'?
Why Scala is better than Java? What are the advantages of Scala over Java (Java 8)? Compare to Java What are the major advantages or benefits of Scala?
What are the Java’s OOP constructs not supported by Scala? What are the Scala’s OOP constructs not supported by Java? What are the new OOPs constructs introduced by Scala, but not supported by Java?
What is guard in Scala’s for-comprehension construct?
What is seq in scala collection?
Explain what is unit in scala?
What is a ‘Scala map’?