Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is default access modifier in Scala?Does Scala have 'public' keyword?



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

Post New Answer

More Scala Interview Questions

Explain the scope provided for variables in scala.

1 Answers  


What is a companion object in scala?

1 Answers  


What is a applicative?

1 Answers  


Mention the difference between an object and a class ?

1 Answers  


What is repl in scala?

1 Answers  


What is a stream in scala?

1 Answers  


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?

1 Answers  


What companies use scala?

1 Answers  


Describe loops in scala?

1 Answers  


What is an Higher-Order Function (HOF)?

1 Answers  


Explain how scala is both functional and object-oriented programming language?

1 Answers  


What is 'Type Inference' in Scala?

1 Answers  


Categories