Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the purpose of generic in java? where do we use generic ?

user-image
Question added by Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution
Date Posted: 2013/11/28
Deleted user
by Deleted user

If we follow generics perfectly we can reduce the duplication and avoid type cast exceptions.

1. Strong check types

2. Elimination of casts

3. To ease programmers to define generic logic across the application.

 

Md Khalid Ahmad
by Md Khalid Ahmad , Senior Java Developer , BRITSH TELECOM

The purpose of generic is to void type casting and run time exception.

More Questions Like This