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 to declare a function in scala?



How to declare a function in scala?..

Answer / Reetesh Kumar

A function in Scala is declared using the def keyword followed by the name of the function, its parameters enclosed in parentheses, and the return type. For example: def addNumbers(num1: Int, num2: Int): Int

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

What is Monad in Scala?

1 Answers  


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

1 Answers  


What is auxiliary constructor in scala?

1 Answers  


In what ways that Scala is healthier than different programming language?

1 Answers  


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

1 Answers  


What is the use of ‘???’ in Scala-based Applications?

1 Answers  


Why is scala good for big data?

1 Answers  


What does raw method in scala string interpolation?

1 Answers  


What is the difference between Java’s 'If..Else' and Scala’s 'If..Else'?

1 Answers  


What is Case Classes?

1 Answers  


Is scala easy to learn?

1 Answers  


What is repl in scala?

1 Answers  


Categories