This video explains about Dataprovider in Testng.
Dataprovider:
**************
1. To repeat the testcases for specific no of times
2. 2d array
3. Rows specify the no of times to run
4. columns specify the no of parameters
5. Object
For code please refer http://qacrunch.in/