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

What is function currying in Scala?

1 Answers  


Explain que?

1 Answers  


What do you understand by apply and unapply methods in scala?

1 Answers  


What is a ‘Scala set’? What are methods through which operation sets are expressed?

1 Answers  


Explain traits in scala.

1 Answers  


What is the difference between Java’s 'If..Else' and Scala’s 'If..Else'?

1 Answers  


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?

1 Answers  


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?

1 Answers  


What is guard in Scala’s for-comprehension construct?

1 Answers  


What is seq in scala collection?

1 Answers  


Explain what is unit in scala?

1 Answers  


What is a ‘Scala map’?

1 Answers  


Categories