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 is the syntax for function declaration in scala?



What is the syntax for function declaration in scala?..

Answer / Pradeep Kumar Dixit

The basic syntax for a function declaration in Scala is def functionName(parameters): returnType = { /*function body*/ }. For example, def addNumbers(x: Int, y: Int) : Int = x + y.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

What is the difference between Case Object and Object(Normal Object)?

1 Answers  


How Scala supports both Highly Scalable and Highly Performance applications?

1 Answers  


What is try catch in scala?

1 Answers  


What are higher-order functions in scala?

1 Answers  


How many values of type Unit have in Scala?

1 Answers  


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

1 Answers  


what are the features of scala?

1 Answers  


What square measure implicit parameters in Scala?

1 Answers  


Explain extend keyword?

1 Answers  


What is pattern matching?

1 Answers  


Explain que with example?

1 Answers  


Explain extractors in scala?

1 Answers  


Categories