3 ms·
Actually in Java you can cast String[] to Object[] although this is technically unsound. This how generic methods like Arrays.sort() are implemented.
by sltkr 2y ago
Actually in Java you can cast String[] to Object[] although this is technically unsound.
This how generic methods like Arrays.sort() are implemented.
- saurik 2y agoHuh, 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).