5 years ago in Java Generics

Which of these is an correct way of defining generic class?

[A] class name(T1, T2, …, Tn) { /* … */ }
[B] class name { /* … */ }
[C] class name[T1, T2, ..., Tn] { /* … */ }
[D] class name{T1, T2, …, Tn} { /* … */ }
Loading...
Next Question

Overall Stats

Attempted 214
Correct 36
Incorrect 85
Viewed 93

Answers

Guest
Guest
Laya
Laya - 2 months ago

Laya from Hyderabad, India is saying class name{T1, T2, …, Tn} { /* … */ } is correct answer

Mahendra Pahadiya
Mahendra Pahadiya - 2 months ago

Mahendra Pahadiya is saying class name { /* … */ } is correct answer

Basil Jacob
Basil Jacob - 3 months ago

Basil Jacob from Panampilly Nagar, India is saying class name { /* … */ } is correct answer

Vedant Joshi
Vedant Joshi - 3 months ago

Vedant Joshi is saying class name { /* … */ } is correct answer

keerthi vallabaneni
keerthi vallabaneni - 3 months ago

keerthi vallabaneni from Nellore, India is saying class name { /* … */ } is correct answer

Related Questions

Which of these types cannot be used to initiate a generic type?

  • [A] Integer class
  • [B] Float class
  • [C] Primitive Types
  • [D] Collections

Which of these instance cannot be created?

  • [A] Integer instance.
  • [B] Generic class instance.
  • [C] Generic type instance.
  • [D] Collection instances.

Which of the following allows us to call generic methods as a normal method?

  • [A] Type Interface
  • [B] Interface
  • [C] Inner class
  • [D] All of the mentioned

Which of these Exception handlers cannot be type parameterized?

  • [A] catch
  • [B] throw
  • [C] throws
  • [D] All of the mentioned