in Technology by
What is the advantage of the generic collection?

1 Answer

0 votes
by
There are three main advantages of using the generic collection. If we use the generic class, we don't need typecasting. It is type-safe and checked at compile time. Generic confirms the stability of the code by making it bug detectable at compile time.

Related questions

0 votes
    What is void or Generic pointers in C?...
asked Jan 21, 2021 in Technology by JackTerrance
0 votes
    Which of the following tag represents a generic document or application section in HTML5? A - section B - article C - aside D - header...
asked Dec 1, 2020 in Technology by JackTerrance
0 votes
    To make pointer generic for which date type it need to be declared?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    I'm working on migrating/rewriting some Java generics in C#. I'm getting an error that I don't ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    I'm working on migrating/rewriting some Java generics in C#. I'm getting an error that I don't ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I'm working on migrating/rewriting some Java generics in C#. I'm getting an error that I don't ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I have a generic method which a generic type parameter T which is a subclass of MyClass. Inside that method, I want ... of type erasure): object Demo extends App { def myMethod[T...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    Here is what I want to do: protocol GenericFactory { associatedtype Input associatedtype Value func create(with ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    I am new to OpenCL. I would like to write a generic kernel so later I can extend its use to ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    F# allows constraining generic types on the type's members, similar to: type ClassWithMemberConstraint = class end ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    I need to implement a custom priority queue without using the PriorityQueue form Java.Util... I have three basic methods : ... what I've done so far ... public class PriorityQueue...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    I have a generic method defined like this: public void MyMethod(T myArgument) The first thing I want to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    I have a generic method defined like this: public void MyMethod(T myArgument) The first thing I want to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    I have a generic method defined like this: public void MyMethod(T myArgument) The first thing I want to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    I have a generic method defined like this: public void MyMethod(T myArgument) The first thing I want to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
...