posted 11 years ago
You can cast to any generic type parameter, as long as the upper bound is a supertype of the reference you're casting. It doesn't really make much sense though, because you'd always be casting upwards, which is useless.
For instance, if the class signature was public class ImplicitConv<T extends String> then the program would throw a ClassCastException, as expected.