Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

.Is it a good idea to use Generics in collections?

Pragya Keshap answered on February 4, 2023 Popularity 2/10 Helpfulness 1/10

Contents


More Related Answers

  • what is generic programming
  • import generic
  • Java method that returns a generic type
  • generic list java
  • generics with function expressions
  • generic classes in java
  • java generics type
  • generic method java
  • java generic type method
  • c# reflection create generic type
  • java generics
  • generics Interface in java
  • Typescript Basic Generics
  • Generics
  • Collections with Generics
  • generics in java
  • generic funtions
  • What is generic class in java
  • generics Interface in java
  • generic function in java
  • generic class in java
  • java generics
  • java generics example
  • Create Generic Method
  • java define a generic class that produces

  • .Is it a good idea to use Generics in collections?

    0

    Yes. A collection is a group of elements put together in an order or

    based on a property. Often the type of element can vary. But the

    properties and behavior of a Collection remains same. Therefore it

    is good to create a Collection with Generics so that it is type-safe

    and it can be used with wide variety of elements.

    https://learn.microsoft.com/en-us/dotnet/standard/collections/when-to-use-generic-collections

    Popularity 2/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 04 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.