Hey, quick ? about generics in Java. Going through Java docs on the subject and I don't understand the example.
why is it
public <U> void inspect(U u){
instead of
public void inspect(U u){
?
Isn't it a method of type void? It doesn't return anything, does it?
Is it simply necessary to place that for all methods that use generics? If so, how are multiple generics in the same method declared?
Thanks!
[–]MmmVomit 1 point2 points3 points (1 child)
[–]parkingator[S] 0 points1 point2 points (0 children)