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 Range in Scala? How to create a Range in Scala?



What is Range in Scala? How to create a Range in Scala?..

Answer / Budheshwar Singh

A 'Range' in Scala represents a sequence of integers from a start value, end value (exclusive), and with a step size. To create a range, use the 'to' method on an integer or the 'ranged' method on two integers: val range1 = 1 to 5; val range2 = 0 until 10. Ranges can also be constructed using three arguments with the syntax: val range3 = Range(start, end, step)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

If I want to become a Fullstack Scala Developer, which technology stack I should learn?

1 Answers  


What is the difference between var and value?

1 Answers  


What is an auxiliary constructor?

1 Answers  


Please explain closure is scala?

1 Answers  


What is an array in scala?

1 Answers  


What is unit in scala?

1 Answers  


What is Nothing in Scala? What is Nil in Scala? What is the relationship between Nothing and Nil in Scala?

1 Answers  


What is an anonymous object in scala?

1 Answers  


How do we make a call to a private primary constructor in scala?

1 Answers  


What is string in scala?

1 Answers  


What is map in scala?

1 Answers  


What is the difference between :: and #:: in scala?

1 Answers  


Categories