5 years ago in Java Generics

Why are generics used?

[A] Generics make code more fast.
[B] Generics make code more optimised and readable.
[C] Generics add stability to your code by making more of your bugs detectable at compile time.
[D] Generics add stability to your code by making more of your bugs detectable at run time.
Loading...
Next Question

Overall Stats

Attempted 240
Correct 56
Incorrect 69
Viewed 115

Answers

Guest
Guest
Laya
Laya - 2 months ago

Laya from Hyderabad, India is saying Generics add stability to your code by making more of your bugs detectable at compile time. is correct answer

keerthi vallabaneni
keerthi vallabaneni - 3 months ago

keerthi vallabaneni from Nellore, India is saying Generics add stability to your code by making more of your bugs detectable at compile time. is correct answer

SHASHANK PANDEY
SHASHANK PANDEY - 4 months ago

SHASHANK PANDEY from Pune, India is saying Generics add stability to your code by making more of your bugs detectable at compile time. is correct answer

Saba Shaheen
Saba Shaheen - 4 months ago

Saba Shaheen from India is saying Generics make code more optimised and readable. is correct answer

riya
riya - 4 months ago

riya is saying Generics add stability to your code by making more of your bugs detectable at run time. is correct answer

Related Questions

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} { /* … */ }

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

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