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

Does Kotlin allow macros?

1 Answers  


What are the features available in kotlin but not in java?

1 Answers  


What is nested class in Kotlin?

1 Answers  


What are the major features of Kotlin?

1 Answers  


What are the features that kotlin support and java doesn’t?

1 Answers  


List down some kotlin data class built in methods?

1 Answers  


What are some of the features which are there in Kotlin but not In Java?

1 Answers  


What is the extension of Kotlin file?

1 Answers  


What is the difference between const vs val?

1 Answers  


Why is Kotlin preferred over Java? Important benefits of kotlin?

1 Answers  


How do you migrate the code from Java to Kotlin ?

1 Answers  


Who is the developer of Kotlin?

1 Answers  


Categories