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


How do you define a function in scala?



How do you define a function in scala?..

Answer / Kumar Niraj

You define a function in Scala using the 'def' keyword followed by the function name, parameter list, and return type (optional). The body of the function is enclosed in curly braces.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

What is object in Scala? Is it a singleton object or instance of a class?

1 Answers  


Explain data types in scala?

1 Answers  


What are the advantages of case class?

1 Answers  


What is a companion object?

1 Answers  


Explain any five string methods?

1 Answers  


What is a companion object in scala?

1 Answers  


What is for-comprehension in scala?

1 Answers  


What language is scala written in?

1 Answers  


What is a flatmap in scala?

1 Answers  


What square measure implicit parameters in Scala?

1 Answers  


What is akka in scala? Explain

1 Answers  


Mention the identifiers in scala?

1 Answers  


Categories