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 difference between apply and unapply methods in scala?



What is the difference between apply and unapply methods in scala?..

Answer / Nitin Gupta

The apply method is used to create a new instance of a case class, while the unapply method is used to deconstruct an instance of a case class. The apply method takes arguments and creates a new object, while the unapply method breaks down an existing object into its constituent parts.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

What is an Higher-Order Function (HOF)?

1 Answers  


What is vector in scala collection?

1 Answers  


What is the utilization of tuples in scala?

1 Answers  


Explain the functionality of yield?

1 Answers  


What is listset in scala collection?

1 Answers  


Why scala prefers immutability?

1 Answers  


Which scala library is used for the functional programming?

1 Answers  


What is the difference between a java future and a scala future?

1 Answers  


What is the difference between call-by-value and call-by-name function parameters?

1 Answers  


Explain the operators in scala?

1 Answers  


What is anonymous (lambda) function in scala?

1 Answers  


What is lazy val in scala?

1 Answers  


Categories