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

Is scala good for machine learning?

1 Answers  


What are the popular JVM Languages available now?

1 Answers  


What is the difference between val and var in Scala?

1 Answers  


What is the Main drawback of Scala Language?

1 Answers  


What is the main motto of Scala Language?

1 Answers  


How is a class different from an object?

1 Answers  


Is Scala a Pure OOP Language? or Java a Pure OOP Language?

1 Answers  


What is a monad in scala?

1 Answers  


Explain exception handling in scala?

1 Answers  


What is Case Classes?

1 Answers  


Explain the difference between val and var in scala?

1 Answers  


Explain recursion through a program?

1 Answers  


Categories