'No need to consider resource usage for typecasts in Kotlin/Java?
While use Kotlin, I have questions about type casting.
I think, Downcast (like Any as Int) use some resources (expensive) but Upcast (like Int as Any) don’t use resources (or really few). Is my thinking right?
Some people say that Kotlin/Java don’t need to care anymore about casting resources because JVM keep developing. Is this right?
I want to check myself these thinks are right or not. How I can make sample sources on IDE? (Check running time? or memory uses?)
Thank you for your interesting, and I'm waiting your advice.
Sincerely.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
