Can anyone explain concept of in and out. In kotlin generic. Example code will help much better.
It is definitely a confusing concept. I have used it, but am by no means an expert. This link was how I managed to get it working. Given my hundreds of Kotlin codes, I haven't found where as yet. https://blog.kotlin-academy.com/kotlin-generics-variance-modifiers-36b82c7caa39
The out seems similar to wildcard in Java, but I've never made generics in Java so have never played with them. However, placing constraints on the types matches too and has similar syntax: <T : Number> would allow Int or Double types.
Sir one more thing this in and out has any similarities with concept of wildcard extends and super upper bounded and lower bounded wild cards? In java.
Application RAM usage
About Java McQ
How to split a string ,containing two or more integers seperated by comma, into two or more integers.