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

In Scala, Pattern Matching follows which Design Pattern? In Java, ‘isinstanceof’ operator follows which Design Pattern?

1 Answers  


Why do we need app in scala?

1 Answers  


Explain what is Scala?

1 Answers  


What does map in scala collection?

1 Answers  


Is scala the best language ever?

1 Answers  


What is currying in scala?

1 Answers  


What is scala best used for?

1 Answers  


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

1 Answers  


What are the four types of scala identifiers ?

1 Answers  


What is option/some/none design pattern in scala?

1 Answers  


Write a few frameworks of scala?

1 Answers  


In what ways Scala is better than other programming language?

1 Answers  


Categories