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...


Differentiate between generics in and out in Kotlin?



Differentiate between generics in and out in Kotlin?..

Answer / Nipander Singh

'in' is used to specify that a particular type can be passed as an argument, while 'out' is used to specify that a particular type can be returned. For example: fun <T> myFunction(t: T): T {} means T can be any type and the function returns the same type.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Kotlin Interview Questions

What are the advantages and disadvantages of Kotlin?

1 Answers  


How to make a class data class ?

1 Answers  


Which type of programming does kotlin support?

1 Answers  


How to declare variable in Kotlin ?

1 Answers  


Does Kotlin support primitive Datatypes?

1 Answers  


Differentiate between val and var in Kotlin?

1 Answers  


How to declare variables in Kotlin?

1 Answers  


What is inner class in Kotlin?

1 Answers  


Give a syntax for declaring a variable as volatile in Kotlin?

1 Answers  


What are the modifiers that are available in kotlin?

1 Answers  


Explain Higher-Order Functions?

0 Answers  


How can you declare a variable in Kotlin?

1 Answers  


Categories