Paul Clapham wrote:When you do that there's no chance of reusing the names of actual types.
I say "no chance" but that's under the assumption that you didn't also create an actual class whose name is "T"; if you did then you would run into problems trying to use it in a context where "T" is also a type parameter. But you'd only do that if you were writing a certification exam and wanted another way to bamboozle the test-taker.
I agree with Paul C. Use a single letter name for your formal type parameters, so it will be different from the names of any “real” types We sometime see people gettting confused because they use the name of a “real” type as a formal type parameter and think the compiler will use that type. If you really want to use Integers, writeOf course, Integer is a final type, so it has no subtypes, so the above declaration is pointless. It will behave no differently from this:-You could try something like this,I tried it on JShell