Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: