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 do you mean by trait in scala and when it is used?



What do you mean by trait in scala and when it is used?..

Answer / Ramgopal Singh

A Trait in Scala is a type that contains a certain number of methods, without providing their implementations. It allows for multiple inheritance (mixing) of behaviors. Traits are primarily used when a class needs to reuse code written in other classes. They can be mixed into classes and other traits using with keyword.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

What does sortedset in scala collection?

1 Answers  


What is Diamond Problem? How Scala solves Diamond Problem?

1 Answers  


What are the available Build Tools to develop Play and Scala based Applications?

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  


Is it a Language or Platform? Does it support OOP or FP?

1 Answers  


What is the best Code-coverage tool available for Play and Scala based applications?

1 Answers  


What do you mean by trait in scala and when it is used?

1 Answers  


Give some examples of packages in scala?

1 Answers  


What is function composition in scala?

1 Answers  


Why should I learn scala?

1 Answers  


Explain the use of tuples in scala?

1 Answers  


What is the difference between :: and #:: in scala?

1 Answers  


Categories