Agreed no one in practice will likely ever see this. Ability to compile vs warned about it are two different things. Those that know Java would quickly be aware that a) type erasure is a thing, it allows stuff like this b) even if they wrote some of this their IDE or compiler would generate a ton of warnings. Generally when you have a compiler - you learn to look at the output of it.