Which Of These Is An Correct Way Of Defining Generic Method #1176
Which of these is an correct way of defining generic method?
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Java Generics - Java Generic Methods - Quiz No.1.
Which of these is an correct way of defining generic method?
<T1, T2, …, Tn> name(T1, T2, …, Tn) { /* … */ }
public <T1, T2, …, Tn> name<T1, T2, …, Tn> { /* … */ }
class <T1, T2, …, Tn> name[T1, T2, …, Tn] { /* … */ }
<T1, T2, …, Tn> name{T1, T2, …, Tn} { /* … */ }