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 are the advantages of case class?

1 Answers  


How do I append data in a list?

1 Answers  


What is a stream in scala?

1 Answers  


What language is scala written in?

1 Answers  


What is the final class in scala?

1 Answers  


Like Hibernate for Java-based applications, What are the Popular ORM Frameworks available to use in Play/Scala based applications?

1 Answers  


What are the popular MVC frameworks for Scala Language to develop Web Applications?

1 Answers  


What is Statically-Typed Language and What is Dynamically-Typed Language?

1 Answers  


Why is scala good for big data?

1 Answers  


What is scala best used for?

1 Answers  


Does Scala support all Functional Programming concepts? Does Java 8 support all Functional Programming concepts?

1 Answers  


What is an array in scala?

1 Answers  


Categories