What is the benefit of using generics with collections in Java?
A. It allows collections to store any type of elements
B. It ensures type safety by allowing only specific types of elements
C. It reduces the size of collections
D. None of These
Answer: Option B
Join The Discussion