Hacker News new | past | comments | ask | show | jobs | submit login

Actually in Java you can cast String[] to Object[] although this is technically unsound.

This how generic methods like Arrays.sort() are implemented.






Huh, fair enough!! What's then funny in the context of this thread is that, while I am sure I knew that 20-25 years ago, it feels so wrong that it would support that -- and more like a "quirk" that it ever would -- that it surprises me (though it certainly doesn't shock me: most things have many quirks).



Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: