Qus:    Why do we have generic programming?
Apr 19, 2021 11:59 1 Answers Views: 422 ROHAN
Prev Next
Answers (1)
SANJAY Apr 20, 2021 12:10
Answer:   We have "generics" because the language imposes strict type checking at compile time.
We have to "explain to the compiler," with generics, what types are supported so that it can verify that we're using it right later.
Languages that defer "type checking" until runtime don't have "generics." Nor any need or use for them.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.

Let`s Connect