Hacker News new | ask | show | jobs
by mmis1000 2345 days ago
Java will crash if type actually does not match at runtime. You can do whatever cast you want to it ,but it is not necessary to work.

And kotlin even includes a key word to say: if cast does not work, just return null.