What is true about the use of generics in Java collections?

1
Generics prevent the insertion of objects of the wrong type at runtime.
2
Collections using generics do not require casting when retrieving elements.
3
Using generics with collections eliminates the need for overloading methods.
4
Generics enhance the runtime efficiency of collections by using specific types instead of Object.

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation