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...


Explain trait in scala and its uses?



Explain trait in scala and its uses?..

Answer / Kumar Amit

A Trait in Scala is a partial abstract class that can be mixed into other classes to inherit its members. It allows for multiple inheritance in a more controlled manner than traditional Java interfaces. Traits can contain both abstract methods (without implementations) and concrete methods (with implementations). They are useful for sharing behavior across multiple classes or providing a way to extend functionality without creating a new hierarchy.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

Difference between Scala’s Inner class and Java’s Inner class?

1 Answers  


What is a trait mixins in scala?

1 Answers  


How Scala supports both Highly Scalable and Highly Performance applications?

1 Answers  


Which IDEs support Play and Scala-Based Applications Development and how?

1 Answers  


What are the advantages of scala over java (java 8)?

1 Answers  


What is method overriding in scala?

1 Answers  


What are the advantages of Play/Scala stack to develop web applications?

1 Answers  


What is an abstract class in scala?

1 Answers  


mention the types of variables in scala? And what is the difference between them?

1 Answers  


Describe loops in scala?

1 Answers  


What is a constructor in scala?

1 Answers  


What is currying in scala?

1 Answers  


Categories