I am new to java generics my question is :
public static < E > void printArray( E[] inputArray )
In the above statement when the retu
By
you define a generic variable type, if you will write
public static void printArray( E[] inputArray )
Java will try to find a class with name E
, because you don't define E
as a generic.
The return value in both cases are null, this
generic definition part in not a part of return value, it's a separate block of function signature.